diff --git a/client/src/app/Main.res b/client/src/app/Main.res index e3658239a0..45a2383285 100644 --- a/client/src/app/Main.res +++ b/client/src/app/Main.res @@ -1856,7 +1856,7 @@ let update_ = (msg: msg, m: model): modification => { | RefreshAvatars => ExpireAvatars - | RefreshPageIfUrlIsStable => + | RefreshIfPageIsRefreshable => switch m.visibility { | Visible => NoChange | Hidden => @@ -2227,7 +2227,7 @@ let subscriptions = (m: model): Tea.Sub.t => { let refreshClientHourly = Tea.Time.every( ~key="refresh_client", Tea.Time.hour, - f => AppTypes.Msg.TimerFire(RefreshPageIfUrlIsStable, f), + f => AppTypes.Msg.TimerFire(RefreshIfPageIsRefreshable, f), ) // Note: putting a timer in the 'hidden' list doesn't prevent it from being run diff --git a/client/src/core/Types.res b/client/src/core/Types.res index 2da18966a0..183c606855 100644 --- a/client/src/core/Types.res +++ b/client/src/core/Types.res @@ -138,9 +138,8 @@ and timerAction = | RefreshAnalysis | RefreshAvatars | CheckUrlHashPosition - // TODO: 'stable' is not the right word. - // I really mean "a refresh would leave them in the same place without interruption" - | RefreshPageIfUrlIsStable + // "Refreshable" = refreshing will leave the user in the same visual state + | RefreshIfPageIsRefreshable and traceID = string