Skip to content

Commit

Permalink
Merge pull request #4442 from nextcloud/bugfix/noid/fixPreviousChatMe…
Browse files Browse the repository at this point in the history
…ssageCrash

fix crash when getting previousChatMessage
  • Loading branch information
sowjanyakch authored Nov 13, 2024
2 parents 89f3d8a + dcec7bd commit f0a9d6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2663,8 +2663,8 @@ class ChatActivity :
chatMessage.activeUser = conversationUser

adapter?.let {
val previousChatMessage = adapter!!.items[1].item
if (previousChatMessage is ChatMessage) {
val previousChatMessage = it.items?.getOrNull(1)?.item
if (previousChatMessage != null && previousChatMessage is ChatMessage) {
chatMessage.isGrouped = groupMessages(chatMessage, previousChatMessage)
}
chatMessage.isOneToOneConversation =
Expand Down

0 comments on commit f0a9d6a

Please sign in to comment.