Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
session: Remember to fetch data after logout and login.
Our initial fetch of a snapshot of the user's data from the server, and subscription to a queue of updates to that data, are done in `doInitialFetch`, which is controlled by the `needsInitialFetch` flag. That flag's effect is edge-triggered -- it's consulted inside a `componentDidUpdate` method, which means it typically will cause a `doInitialFetch` call only when it's *updated* to true, not if it's continuously true. In particular this means that on login, when we certainly need to fetch the data from the server, we need `needsInitialFetch` to *have been* false so that our updating it to true will have the desired effect. In particular, if the user logs out, we certainly want the flag to be false. Make that change. Before this change, if the user managed to do a logout / login sequence where `needsInitialFetch` starts out true, we'd sit not loading any data until they quit the app and relaunched it. [greg: expanded commit message]
- Loading branch information