Subscribe to view model is already disposed
This commit is contained in:
parent
c57d41863f
commit
31984a57d6
|
@ -193,14 +193,15 @@ class HomeDetailFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupKeysBackupBanner() {
|
private fun setupKeysBackupBanner() {
|
||||||
serverBackupStatusViewModel.subscribe(this) {
|
serverBackupStatusViewModel
|
||||||
when (val banState = it.bannerState.invoke()) {
|
.subscribe(this) {
|
||||||
is BannerState.Setup -> homeKeysBackupBanner.render(KeysBackupBanner.State.Setup(banState.numberOfKeys), false)
|
when (val banState = it.bannerState.invoke()) {
|
||||||
BannerState.BackingUp -> homeKeysBackupBanner.render(KeysBackupBanner.State.BackingUp, false)
|
is BannerState.Setup -> homeKeysBackupBanner.render(KeysBackupBanner.State.Setup(banState.numberOfKeys), false)
|
||||||
null,
|
BannerState.BackingUp -> homeKeysBackupBanner.render(KeysBackupBanner.State.BackingUp, false)
|
||||||
BannerState.Hidden -> homeKeysBackupBanner.render(KeysBackupBanner.State.Hidden, false)
|
null,
|
||||||
}
|
BannerState.Hidden -> homeKeysBackupBanner.render(KeysBackupBanner.State.Hidden, false)
|
||||||
}.disposeOnDestroyView()
|
}
|
||||||
|
}
|
||||||
homeKeysBackupBanner.delegate = this
|
homeKeysBackupBanner.delegate = this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue