Change load order when focusing image

This commit is contained in:
Emi Simpson 2022-11-16 11:54:27 -05:00
parent 40757cbe6a
commit f364d00d3e
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ update' (ImgUpdate isThumb pos newData) (GLoaded gal) =
_, Nothing -> Modify $ GError $ UnexpectedError $ "Suprising out of bound index!"
_, (Just _) -> Modify newGallery -- No fetch required
update' (Focus imageIndex) (GLoaded gal) = Both
([DownloadImage >>> pure] <*> [imageIndex, imageIndex - 1, imageIndex + 1])
([DownloadImage >>> pure] <*> [imageIndex, imageIndex + 1, imageIndex - 1])
(GLoaded gal{ focus = Just { imageIndex, zoom: false } })
update' Unfocus (GLoaded gal) = Modify $ GLoaded gal{ focus = Nothing }
update' Zoom (GLoaded gal) = Modify $ GLoaded gal{ focus = gal.focus <#> _{ zoom = true } }