You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similarly to older issues that have since been either closed or fixed such as #370 and #123 and #731 and #663
This bug seems to have been long-standing, but with MutableStateFlow(UiState) it still persists - as on this screen, SavedStateHandle is used only for transferring screen arguments to the ViewModel, but is not actually used to preserve user inputs across process death.
Similarly to older issues that have since been either closed or fixed such as #370 and #123 and #731 and #663
This bug seems to have been long-standing, but with
MutableStateFlow(UiState)
it still persists - as on this screen, SavedStateHandle is used only for transferring screen arguments to the ViewModel, but is not actually used to preserve user inputs across process death.architecture-samples/app/src/main/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskViewModel.kt
Lines 39 to 40 in 7e9d96d
On the other hand, TasksViewModel correctly persists the current filter state using
savedStateHandle.getStateFlow
.architecture-samples/app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksViewModel.kt
Lines 64 to 65 in 7e9d96d
Filtering state on the tasks screen was originally fixed by setting it on the SavedStateHandle in this commit: cfb5ac6#diff-631edb6efa01767b52856a0e498dc3987e8a2f0e8ba02837377dfbc5684af0cfR111
Therefore, AddEdit screen should also correctly save/restore user inputs across process death.
The text was updated successfully, but these errors were encountered: