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 long term exercise screens correctly #1040

Open
ztefanie opened this issue Nov 26, 2024 · 3 comments
Open

Update long term exercise screens correctly #1040

ztefanie opened this issue Nov 26, 2024 · 3 comments
Labels
bug Something isn't working Suggestion:LOW

Comments

@ztefanie
Copy link
Member

Describe the Bug

  • Fix the navigation bar badge: After finishing exercises or adding new words, the badge is not always updated correctly.
  • Fix the navigation to the repetition screen, should always be updated, not working correctly.

Steps to Reproduce

  • Add new words to the repetition exercise. See both the footer and the screen are not updated as expected. When closing and reopening the app, the view is displayed correctly.

Expected Behavior

Screen and badge are updated immediately

Actual Behavior

Screens do not update

@ztefanie ztefanie added the bug Something isn't working label Nov 26, 2024
@ztefanie ztefanie added this to the Long term memory exercise milestone Nov 26, 2024
@david-venhoff
Copy link
Member

Looks like the main problem is that our async store is not reactive. The current workaround is that we just refresh values from the store every time a focus event happens, which seems to go wrong here somehow.

Maybe a more robust solution would be to switch to something like https://github.com/ammarahm-ed/react-native-mmkv-storage?

@david-venhoff
Copy link
Member

Actually, I can only reproduce this issue when I add words with the devtools to fill the repetition excercise with data. So it is rather low prio imo

@david-venhoff
Copy link
Member

david-venhoff commented Feb 11, 2025

For future reference, I have create a proof of concept branch that switches to reactive sync storage, which avoids the need for any focus effect hacks: experiment/sync-storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Suggestion:LOW
Projects
Status: No status
Development

No branches or pull requests

3 participants