Changing page = reset the keepalive counter.
parent
66c050ad0c
commit
db2f64cc80
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue