Android-CleanArchitecture-Kotlin icon indicating copy to clipboard operation
Android-CleanArchitecture-Kotlin copied to clipboard

Configuration change is not handled

Open jaychang0917 opened this issue 6 years ago • 2 comments

Steps to reproduce:

  1. Switch off network connection
  2. Open the app, show "No network connection" snackbar
  3. Switch on network connection
  4. Click "Refresh", movies show up
  5. Then rotate screen, "No network connection" snackbar is shown.

The cause perhaps is that the MoviesViewModel holds the previous Failure value during configuration change.

jaychang0917 avatar Jun 02 '18 15:06 jaychang0917

It'd be nice if there was something like an UnicastSubject for the errors separate from the Data in a BehaviorSubject

Zhuinden avatar Jun 02 '18 16:06 Zhuinden

Thanks. I will mark this as a bug and will try to fix it asap. Although a PR is very welcome.

android10 avatar Jun 25 '18 12:06 android10