summaryrefslogtreecommitdiff
path: root/Hero/Client.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hero/Client.hs')
-rw-r--r--Hero/Client.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Hero/Client.hs b/Hero/Client.hs
index a513dcd..4189fd8 100644
--- a/Hero/Client.hs
+++ b/Hero/Client.hs
@@ -28,6 +28,7 @@ import Hero.App
ComicReaderState (..),
ComicReaderView (..),
Model (..),
+ User (..),
audioId,
chooseExperienceLink,
comicPlayerFullLink,
@@ -130,12 +131,13 @@ move (ToggleZoom c pg) m = m {cpState = newState} <# pure act
Reading Full _ _ -> (reading Spread, goto comicPlayerSpreadLink)
Reading Spread _ _ -> (reading Full, goto comicPlayerFullLink)
x -> (x, NoOp)
-move (ToggleInLibrary c) model = model {userLibrary = newLib} <# pure NoOp
+move (ToggleInLibrary c) model = model {user = newUser} <# pure NoOp
where
+ newUser = (user model) { userLibrary = newLib }
newLib
- | c `elem` userLibrary model =
- Protolude.filter (/= c) $ userLibrary model
- | otherwise = c : userLibrary model
+ | c `elem` (userLibrary $ user model) =
+ Protolude.filter (/= c) $ userLibrary $ user model
+ | otherwise = c : (userLibrary $ user model)
move (HandleURI u) model = model {uri = u} <# pure NoOp
move (ChangeURI u) model = model <# do
pushURI u