Changing page = reset the keepalive counter.

This commit is contained in:
Philippe Pittoli 2024-11-14 23:34:48 +01:00
parent 66c050ad0c
commit db2f64cc80

View File

@ -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