Skip to content

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

@Eivyses

Description

@Eivyses

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions