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

Tracks saving flow should persist #306

Closed
3 tasks
achou11 opened this issue Apr 30, 2024 · 0 comments · Fixed by #315
Closed
3 tasks

Tracks saving flow should persist #306

achou11 opened this issue Apr 30, 2024 · 0 comments · Fixed by #315
Assignees

Comments

@achou11
Copy link
Member

achou11 commented Apr 30, 2024

PR comment with original context located here

When in the flow of saving a track, there's a chance that the app may quite unexpectedly or the user leaves it unintentionally. In order to avoid lost information, we want to have a similar pattern to what we do with observations, where we persist information to local storage (we mmkv via zustand persist) and read that on initial app load to determine if there was an "in-progress" track being saved.

Changes needed:

  • Update the zustand store used for tracks to use persist the relevant tracks information (e.g. locationHistory). see createPersistedState.ts
  • update AppNavigator.tsx to load an existing track as the initial route for the navigator if it exists and if the feature flag is enabled. See implementation in that file for observations as an example
    • in this specific case, the save behavior of the Saving Track screen should reset the navigation state so that the screen cannot be returned to afterwards (e.g. back button/gesture).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants