Support non-fa site icons by giving sites an actual name separate from their icon class

This commit is contained in:
Danielle McLean 2017-10-10 22:41:49 +11:00
parent 18ffe8ea4d
commit 09731053c2
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
5 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,7 @@ arrangeProfiles :: [Profile] -> M.Map (Key Site) (Site, Template) -> [((Site, Te
arrangeProfiles profiles sites = sortBy icon $ zip profileSites profiles
where findSite = fromJust . flip M.lookup sites . profileSiteId
profileSites = findSite <$> profiles
icon = comparing $ siteIcon . fst . fst
icon = comparing $ siteName . fst . fst
prettyPgp :: PgpKey -> Text
prettyPgp = T.unwords . T.chunksOf 4 . pgpKeyFingerprint

View file

@ -31,7 +31,7 @@ hEntry (Entity entryId entry) = do
E.on $ profile ^. ProfileSiteId E.==. site ^. SiteId
E.on $ syndication ^. SyndicationProfileId E.==. profile ^. ProfileId
E.where_ $ syndication ^. SyndicationEntryId E.==. E.val entryId
E.orderBy [E.asc $ site ^. SiteIcon]
E.orderBy [E.asc $ site ^. SiteName]
return (syndication ^. SyndicationUrl, site ^. SiteIcon, E.coalesceDefault [profile ^. ProfileDisplayName] (profile ^. ProfileUsername))
maybeAuthor <- handlerToWidget . runDB . get . entryAuthorId $ entry
$(widgetFile "mf2/h-entry")