Closed Zhuinden closed 5 years ago
Thanks a lot for reporting 👍 Will fix this on Tuesday!
I've got a fix for this - will open a PR when I can.
viewModel.stop()
isn't actually necessary, as the onCleared
will handle the case where the handler needs clearing.
https://github.com/sellmair/kompass/blob/ceed98827b5aa5687df78b83d9de8060ffc7e0dc/android-example--fragment/src/main/java/io/sellmair/kompass/android/example/viewmodel/LoginProcessingViewModel.kt#L37-L39
Because of
viewModel.stop()
inonPause
, if app is put to background and brought to foreground whileLoginProcessingFragment
is on front, then the app gets stuck here forever.You might want to consider some form of observable that the is bound to
onStart/onStop
rather thanonPause
(and no counterpart).After rotation, it still gets stuck on the screen: