Fix crashes destroying conversation activity

This commit is contained in:
fanchao 2024-08-13 14:29:22 +10:00
parent 4c52e66c0c
commit 09e46134e6

View File

@ -852,9 +852,11 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
} }
override fun onDestroy() { override fun onDestroy() {
if(::binding.isInitialized) {
viewModel.saveDraft(binding.inputBar.text.trim()) viewModel.saveDraft(binding.inputBar.text.trim())
cancelVoiceMessage() cancelVoiceMessage()
tearDownRecipientObserver() tearDownRecipientObserver()
}
super.onDestroy() super.onDestroy()
} }
// endregion // endregion