From db2f64cc80b5535d4331bba4680794d800b50208 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 14 Nov 2024 23:34:48 +0100 Subject: [PATCH] Changing page = reset the keepalive counter. --- src/App/Container.purs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App/Container.purs b/src/App/Container.purs index 964a212..d2660d9 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -354,6 +354,9 @@ handleAction = case _ of H.tell _nav unit $ NavigationInterface.TellLogin (Just name) Routing page -> do + -- Each time the user change load a new page, the counter gets reset + -- since it proves they are still active. + H.modify_ _ { keepalive_counter = 0 } -- Store the current page we are on and restore it when we reload. sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window H.liftEffect $ Storage.setItem "current-page" (case page of