mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash if composing is sent when chat room not initialized yet
This commit is contained in:
parent
0625239477
commit
e5795ea05f
1 changed files with 4 additions and 1 deletions
|
|
@ -191,6 +191,7 @@ class SendMessageInConversationViewModel
|
|||
|
||||
@UiThread
|
||||
fun configureChatRoom(room: ChatRoom) {
|
||||
Log.i("$TAG Chat room configured")
|
||||
chatRoom = room
|
||||
coreContext.postOnCoreThread {
|
||||
chatRoom.addListener(chatRoomListener)
|
||||
|
|
@ -324,7 +325,9 @@ class SendMessageInConversationViewModel
|
|||
@UiThread
|
||||
fun notifyChatMessageIsBeingComposed() {
|
||||
coreContext.postOnCoreThread {
|
||||
chatRoom.compose()
|
||||
if (::chatRoom.isInitialized) {
|
||||
chatRoom.compose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue