mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-18 06:32:08 +03:00
Merge pull request #4442 from nextcloud/bugfix/noid/fixPreviousChatMessageCrash
fix crash when getting previousChatMessage
This commit is contained in:
commit
f0a9d6a1e1
1 changed files with 2 additions and 2 deletions
|
@ -2663,8 +2663,8 @@ class ChatActivity :
|
||||||
chatMessage.activeUser = conversationUser
|
chatMessage.activeUser = conversationUser
|
||||||
|
|
||||||
adapter?.let {
|
adapter?.let {
|
||||||
val previousChatMessage = adapter!!.items[1].item
|
val previousChatMessage = it.items?.getOrNull(1)?.item
|
||||||
if (previousChatMessage is ChatMessage) {
|
if (previousChatMessage != null && previousChatMessage is ChatMessage) {
|
||||||
chatMessage.isGrouped = groupMessages(chatMessage, previousChatMessage)
|
chatMessage.isGrouped = groupMessages(chatMessage, previousChatMessage)
|
||||||
}
|
}
|
||||||
chatMessage.isOneToOneConversation =
|
chatMessage.isOneToOneConversation =
|
||||||
|
|
Loading…
Reference in a new issue