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

How to force state update after editing data and navigating back? #21

Open
Eivyses opened this issue Feb 9, 2024 · 0 comments
Open

Comments

@Eivyses
Copy link

Eivyses commented Feb 9, 2024

Hello, I'm using this repo as starting blocks for my project. Currently I ran into an issue of room database data not being updated after navigating back.
So, what happens is:

  • open app (view 1) and go to view that lists elements (view 2)
  • select specific element from a list to open edit view (view 3)
  • delete some kind of entry in edit view
  • navigate back (to view 2)
  • view that lists elements still contains deleted info

If I were to navigate back once more to view 1 and then open view 2 then I would see updated data.
I am using two different view models as I have two different Screens/Views.
I assume this happens due to ViewModel not invoking init block on navigate.navigateUp() but I might be wrong.

Does anyone know a solution for this?

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

No branches or pull requests

1 participant