mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-21 11:45:03 +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>) {
|
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
|
val scrollToEndOnUpdate = layoutManager?.findFirstVisibleItemPosition() == 0
|
||||||
|
|
||||||
if (insertNewMessagesNotice) {
|
if (insertNewMessagesNotice) {
|
||||||
|
Loading…
Reference in New Issue
Block a user