refactor: hlint
This commit is contained in:
parent
7896c0bb16
commit
ebe676d39d
@ -48,12 +48,12 @@ postCFavouriteR tid ssh csh = void $ do
|
||||
now <- liftIO getCurrentTime
|
||||
-- Nothing means blacklist
|
||||
-- should never return FavouriteCurrent
|
||||
newReason <- storedFavouriteReason tid ssh csh muid >>= pure . \case
|
||||
newReason <- storedFavouriteReason tid ssh csh muid <&> (\case
|
||||
-- Maybe (Maybe reason, blacklist)
|
||||
Nothing -> Just FavouriteManual
|
||||
Just (_reason, True) -> Just FavouriteVisited
|
||||
Just (Just FavouriteManual, False) -> Nothing
|
||||
Just (_reason, False) -> Just FavouriteManual
|
||||
Just (_reason, False) -> Just FavouriteManual)
|
||||
-- change stored reason in DB
|
||||
case newReason of
|
||||
(Just reason) -> do
|
||||
|
||||
@ -47,7 +47,7 @@ instance Button UniWorX CourseFavouriteToggleButton where
|
||||
-- inspired by examAutoOccurrenceIgnoreRoomsForm
|
||||
courseFavouriteToggleForm :: Maybe FavouriteReason -> Form ()
|
||||
courseFavouriteToggleForm currentReason html
|
||||
= over _1 (fmap $ const ()) <$> identifyForm FIDCourseFavouriteToggle (buttonForm' [btn]) html
|
||||
= over _1 void <$> identifyForm FIDCourseFavouriteToggle (buttonForm' [btn]) html
|
||||
where
|
||||
btn :: CourseFavouriteToggleButton
|
||||
btn = case currentReason of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user