From f364d00d3e3b9cd17864462d44920db353dd31c6 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Wed, 16 Nov 2022 11:54:27 -0500 Subject: [PATCH] Change load order when focusing image --- src/UI.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UI.purs b/src/UI.purs index f7c59aa..b87c290 100644 --- a/src/UI.purs +++ b/src/UI.purs @@ -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 } }