Fix crashes destroying conversation activity

pull/1615/head
fanchao 8 months ago
parent 4c52e66c0c
commit 09e46134e6

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

Loading…
Cancel
Save