super.onClear() called at the end

This commit is contained in:
Benoit Marty 2020-12-29 10:44:37 +01:00
parent 1540f13444
commit 54f6440bcf
7 changed files with 7 additions and 9 deletions

View File

@ -89,8 +89,8 @@ class VerificationChooseMethodViewModel @AssistedInject constructor(
}
override fun onCleared() {
super.onCleared()
session.cryptoService().verificationService().removeListener(this)
super.onCleared()
}
companion object : MvRxViewModelFactory<VerificationChooseMethodViewModel, VerificationChooseMethodViewState> {

View File

@ -93,8 +93,8 @@ class DiscoverySettingsViewModel @AssistedInject constructor(
}
override fun onCleared() {
super.onCleared()
stopListenToIdentityManager()
super.onCleared()
}
override fun handle(action: DiscoverySettingsAction) {

View File

@ -810,9 +810,8 @@ class LoginViewModel @AssistedInject constructor(
}
override fun onCleared() {
super.onCleared()
currentTask?.cancel()
super.onCleared()
}
fun getInitialHomeServerUrl(): String? {

View File

@ -221,7 +221,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState:
}
override fun onCleared() {
super.onCleared()
currentTask?.cancel()
super.onCleared()
}
}

View File

@ -232,8 +232,7 @@ class SoftLogoutViewModel @AssistedInject constructor(
}
override fun onCleared() {
super.onCleared()
currentTask?.cancel()
super.onCleared()
}
}

View File

@ -157,8 +157,8 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
}
override fun onCleared() {
super.onCleared()
session.cryptoService().keysBackupService().removeListener(this)
super.onCleared()
}
override fun onStateChange(newState: KeysBackupState) {

View File

@ -107,8 +107,8 @@ class SignoutCheckViewModel @AssistedInject constructor(@Assisted initialState:
}
override fun onCleared() {
super.onCleared()
session.cryptoService().keysBackupService().removeListener(this)
super.onCleared()
}
override fun onStateChange(newState: KeysBackupState) {