Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config when the session starts and ends #822

Merged
merged 2 commits into from
Aug 29, 2019

Conversation

dusi
Copy link
Contributor

@dusi dusi commented Aug 28, 2019

πŸ“² What

Updates config every time a user logs in or logs out (in addition to launching the app or coming back to the app from background).

πŸ€” Why

We've noticed that the config would only refresh after the app has been backgrounded and brought back to foreground. This caused some confusion when logging in as a different user and logging out because the config wasn't properly updated unless the app was backgrounded and brought back to foreground again. This PR fixes that and should always make sure that the config is always up to date even without leaving the app.

πŸ›  How

Very straightforward, please see the code.

βœ… Acceptance criteria

In order to properly test this you'll have to observe your device connection with mitm tool like Charles proxy or mitmproxy (there's a guru card with instructions on how to set this up).

  • Launching the app from terminated state should fetch config
  • Re-opening the app from background should fetch config
  • Logging in should fetch config
  • Logging out should fetch config

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested several times logging in and out and putting the app in background as well. The config was updated in all cases. ⭐️

@dusi dusi merged commit 27c71eb into master Aug 29, 2019
@dusi dusi deleted the update-config-when-session-changes branch August 29, 2019 15:29
@ifbarrera
Copy link
Contributor

Nice! This has been in the backlog for while 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants