In repo change feed, entry ID is now the URL of patch page

This commit is contained in:
fr33domlover 2018-12-12 08:37:01 +00:00
parent 4bd33b59e5
commit 632bfe1979

View file

@ -32,9 +32,9 @@ import Vervis.Foundation
import Vervis.Model.Ident import Vervis.Model.Ident
import Vervis.Model.Repo import Vervis.Model.Repo
changeEntry :: LogEntry -> FeedEntry (Route App) changeEntry :: ShrIdent -> RpIdent -> LogEntry -> FeedEntry (Route App)
changeEntry le = FeedEntry changeEntry shr rp le = FeedEntry
{ feedEntryLink = HomeR { feedEntryLink = RepoPatchR shr rp $ leHash le
, feedEntryUpdated = fst $ leTime le , feedEntryUpdated = fst $ leTime le
, feedEntryTitle = leMessage le , feedEntryTitle = leMessage le
, feedEntryContent = mempty , feedEntryContent = mempty
@ -72,5 +72,5 @@ changeFeed shr repo mbranch vcs les = Feed
, feedLanguage = "en" , feedLanguage = "en"
, feedUpdated = fst $ leTime $ head les , feedUpdated = fst $ leTime $ head les
, feedLogo = Nothing , feedLogo = Nothing
, feedEntries = map changeEntry les , feedEntries = map (changeEntry shr repo) les
} }