mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Prevent crash when conversation fragment resumes if viewmodel doesn't have a chatRoom stored
This commit is contained in:
parent
6edd20e214
commit
d03f94d52a
1 changed files with 6 additions and 0 deletions
|
|
@ -910,6 +910,12 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (!viewModel.isChatRoomInitialized()) {
|
||||
Log.w("$TAG Fragment resuming but no chatRoom in viewModel, going back")
|
||||
goBack()
|
||||
return
|
||||
}
|
||||
|
||||
viewModel.updateCurrentlyDisplayedConversation()
|
||||
|
||||
// Wait for items to be displayed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue