use sets for tags
This commit is contained in:
parent
b9b0edc173
commit
34bd2214f5
4 changed files with 19 additions and 17 deletions
|
@ -96,7 +96,7 @@ make' root (GalleryInfo {title, desc, prefix, filters, hidden}) infos = [b|
|
|||
undir = joinPath (replicate (length (splitPath prefix)) "..")
|
||||
|
||||
allTags = infos
|
||||
& concatMap (map (,1) . tagsFor nsfw . snd)
|
||||
& concatMap (map (,1) . HashSet.toList . tagsFor nsfw . snd)
|
||||
& HashMap.fromListWith (+) & HashMap.toList
|
||||
& sort
|
||||
|
||||
|
@ -160,7 +160,8 @@ makeItem nsfw file info@(Info {bg}) = [b|
|
|||
dir = takeDirectory file
|
||||
thumbnail = getThumb dir info
|
||||
nsfw' = if nsfw && anyNsfw info then [b|$& nsfw|] else ""
|
||||
tags' = fold $ intersperse ";" $ map fromText $ tagsFor nsfw info
|
||||
tags' = fold $ intersperse ";" $ map fromText $
|
||||
sort $ HashSet.toList $ tagsFor nsfw info
|
||||
date = latestDateFor nsfw info
|
||||
date' = formatTooltip date
|
||||
year' = date.year
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue