style & layout updates
This commit is contained in:
parent
ebd08fb2e5
commit
485b90fb46
9 changed files with 65 additions and 159 deletions
|
@ -3,7 +3,8 @@
|
|||
{-# OPTIONS_GHC -Wno-orphans #-}
|
||||
module Info
|
||||
(Info (..),
|
||||
tagsFor, descFor, imagesFor, linksFor, updatesFor, compareFor, sortFor,
|
||||
tagsFor, descFor, imagesFor, linksFor, updatesFor, lastUpdate,
|
||||
compareFor, sortFor,
|
||||
Artist (..), Images' (..), Images, Image (..), Desc (..), DescField (..),
|
||||
Link (..), Update (..), Bg (..),
|
||||
GalleryInfo (..), GalleryFilters (..), ArtistFilter (..), NsfwFilter (..),
|
||||
|
@ -219,6 +220,10 @@ linksFor nsfw = if nsfw then #links else #sfwLinks
|
|||
updatesFor :: Bool -> Info -> [(Date, [Update])]
|
||||
updatesFor nsfw = if nsfw then #updates else #sfwUpdates
|
||||
|
||||
lastUpdate :: Bool -> Info -> Maybe Date
|
||||
lastUpdate nsfw info =
|
||||
case updatesFor nsfw info of [] -> Nothing; us -> Just $ fst $ last us
|
||||
|
||||
compareFor :: Bool -> Info -> Info -> Ordering
|
||||
compareFor nsfw = comparing \i -> (#latestDate i nsfw, #sortEx i, #title i)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue