Fix crash observed on PlayStore
This commit is contained in:
parent
35229882e3
commit
12a0cbb400
|
@ -29,7 +29,7 @@ import javax.inject.Inject
|
|||
|
||||
|
||||
class SasVerificationViewModel @Inject constructor() : ViewModel(),
|
||||
SasVerificationService.SasVerificationListener {
|
||||
SasVerificationService.SasVerificationListener {
|
||||
|
||||
|
||||
companion object {
|
||||
|
@ -40,7 +40,7 @@ class SasVerificationViewModel @Inject constructor() : ViewModel(),
|
|||
const val NAVIGATE_CANCELLED = "NAVIGATE_CANCELLED"
|
||||
}
|
||||
|
||||
lateinit var sasVerificationService: SasVerificationService
|
||||
private lateinit var sasVerificationService: SasVerificationService
|
||||
|
||||
var otherUserId: String? = null
|
||||
var otherDeviceId: String? = null
|
||||
|
@ -154,8 +154,8 @@ class SasVerificationViewModel @Inject constructor() : ViewModel(),
|
|||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
sasVerificationService.removeListener(this)
|
||||
if (::sasVerificationService.isInitialized) {
|
||||
sasVerificationService.removeListener(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue