fix sfw sort with nsfw update
if the last update to an item is nsfw-only, then it would affect the sfw sorting, even tho it is not relevant, and even if it had ignore-sort set. now it works properly in that situation
This commit is contained in:
parent
09897f27d9
commit
bde75df8ca
1 changed files with 2 additions and 1 deletions
|
@ -163,7 +163,8 @@ instance HasField "notMine" Info Bool where getField = isJust . #artist
|
|||
instance HasField "latestDate" Info (Bool -> Date) where
|
||||
getField info@(Info {date=date₀}) nsfw =
|
||||
maximum $ date₀ : mapMaybe relDate (updatesFor nsfw info)
|
||||
where relDate (date, us) = date <$ guard (not $ any #ignoreSort us)
|
||||
where
|
||||
relDate (date, us) = date <$ guard (not $ null us || any #ignoreSort us)
|
||||
|
||||
instance HasField "latestYear" Info (Bool -> Int) where
|
||||
getField info nsfw = #year $ #latestDate info nsfw
|
||||
|
|
Loading…
Reference in a new issue