diff options
author | Ben Sima <ben@bsima.me> | 2020-04-15 15:24:32 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-04-15 17:19:43 -0700 |
commit | e9a53b69ad68e531a789eff3128f7304fd411808 (patch) | |
tree | 7c0382cb3c49458e8c989eaaa042bc37b37a9699 /Hero/Client.hs | |
parent | cb77d0eb623c7a398ca86a632d0ea37ac385cc3d (diff) |
Lint fixes, also delete Biz.Language
Diffstat (limited to 'Hero/Client.hs')
-rw-r--r-- | Hero/Client.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Hero/Client.hs b/Hero/Client.hs index 0472d48..a513dcd 100644 --- a/Hero/Client.hs +++ b/Hero/Client.hs @@ -122,7 +122,7 @@ move PrevPage model = case cpState model of pure $ ChangeURI $ comicPlayerFullLink id (pg -1) Cover _ -> noEff model _ -> noEff model -move (ToggleZoom c pg) m = m {cpState = newState} <# do pure act +move (ToggleZoom c pg) m = m {cpState = newState} <# pure act where goto lnk = ChangeURI $ lnk (comicId c) pg reading v = Reading v (comicId c) pg @@ -133,9 +133,9 @@ move (ToggleZoom c pg) m = m {cpState = newState} <# do pure act move (ToggleInLibrary c) model = model {userLibrary = newLib} <# pure NoOp where newLib - | c `elem` (userLibrary model) = + | c `elem` userLibrary model = Protolude.filter (/= c) $ userLibrary model - | otherwise = c : (userLibrary model) + | otherwise = c : userLibrary model move (HandleURI u) model = model {uri = u} <# pure NoOp move (ChangeURI u) model = model <# do pushURI u @@ -162,8 +162,8 @@ move ToggleFullscreen model = model {cpState = newState} <# do Reading Spread c n -> (Fullscreen.request, Reading Spread c n) -- otherwise, do nothing: x -> (pure, x) -move (SetMediaInfo x) model = model {dMediaInfo = x} <# do - case x of +move (SetMediaInfo x) model = model {dMediaInfo = x} + <# case x of Just Comic {comicId = id} -> pure $ ScrollIntoView $ "comic-" <> ms id Nothing -> |