mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-22 13:09:46 +01:00
only show new message notice when there are messages from other participants
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5810d070fa
commit
ac39e73782
@ -3759,7 +3759,13 @@ class ChatActivity :
|
||||
}
|
||||
|
||||
private fun processMessagesFromTheFuture(chatMessageList: List<ChatMessage>) {
|
||||
val insertNewMessagesNotice = (adapter?.itemCount ?: 0) > 0 && chatMessageList.isNotEmpty()
|
||||
val newMessagesAvailable = (adapter?.itemCount ?: 0) > 0 && chatMessageList.isNotEmpty()
|
||||
val insertNewMessagesNotice = if (newMessagesAvailable) {
|
||||
chatMessageList.any { it.actorId != conversationUser!!.userId }
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
val scrollToEndOnUpdate = layoutManager?.findFirstVisibleItemPosition() == 0
|
||||
|
||||
if (insertNewMessagesNotice) {
|
||||
|
Loading…
Reference in New Issue
Block a user