android / android/architecture-samples

ViewModels are being reloaded on config changes

Open
#640 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

"Branch : todo-mvvm-live"

. when i rotate device , viewmodel.start has call again and reload data from repo ,the method replaceData is call twice because it load fist time from cache list in viewmodel and second time from list in repo, so the viewmodel architecture are not applied at this time , please fix this , tkanks

Contributor guide

Open the contributing guide

Research direction

Start from the todo-mvvm-live branch and reproduce the reload during device rotation. Trace ViewModel.start and the two replaceData calls, comparing the cache list with the repository list. Done means configuration changes no longer cause the ViewModel to reload or replace the data twice.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.