Skip to content

Commit

Permalink
Rename client page-refresh Action
Browse files Browse the repository at this point in the history
  • Loading branch information
StachuDotNet committed Dec 16, 2022
1 parent 865ba86 commit 7632b50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/src/app/Main.res
Expand Up @@ -1856,7 +1856,7 @@ let update_ = (msg: msg, m: model): modification => {

| RefreshAvatars => ExpireAvatars

| RefreshPageIfUrlIsStable =>
| RefreshIfPageIsRefreshable =>
switch m.visibility {
| Visible => NoChange
| Hidden =>
Expand Down Expand Up @@ -2227,7 +2227,7 @@ let subscriptions = (m: model): Tea.Sub.t<msg> => {
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
Expand Down
5 changes: 2 additions & 3 deletions client/src/core/Types.res
Expand Up @@ -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

Expand Down

0 comments on commit 7632b50

Please sign in to comment.