From 807f6c10fe83001e7cbf79f62f38b249ec7622bd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 10 Jun 2021 18:34:56 -0700 Subject: [PATCH] accounts [nfc]: Point upgrade-refresh TODO at issue newly filed. And tighten the comment here, now that the details live there. --- src/account/accountsReducer.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/account/accountsReducer.js b/src/account/accountsReducer.js index db0f43da916..e012627cef5 100644 --- a/src/account/accountsReducer.js +++ b/src/account/accountsReducer.js @@ -120,15 +120,12 @@ export default (state: AccountsState = initialState, action: Action): AccountsSt if (zulip_feature_level === undefined || zulip_version === undefined) { return state; } + + // TODO: Detect if the feature level has changed, indicating an upgrade; + // if so, trigger a full refetch of server data. See #4793. return [ { ...state[0], - - // TODO (?): Detect if these are different from the values - // we had before, so we know it's an upgrade, not just a - // restart. Then, implement logic like "be sure to refetch - // from scratch within N hours" (to avoid thundering - // herding the server). zulipVersion: new ZulipVersion(zulip_version), zulipFeatureLevel: zulip_feature_level, },