mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-18 05:01:28 +00:00
no "unread messages" popup for invisible messages
if chatMessageList is empty after handleSystemMessages it makes no sense to call the following methods. Also processMessagesFromTheFuture was executed which caused that the popup was shown. A better solution for the future should be to handle(remove) the "to-hide" system messages already in the repo or viewmodel Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
779c1627aa
commit
5535bed35c
@ -861,14 +861,15 @@ class ChatActivity :
|
||||
var chatMessageList = triple.third
|
||||
|
||||
chatMessageList = handleSystemMessages(chatMessageList)
|
||||
if (chatMessageList.isEmpty()) {
|
||||
return@onEach
|
||||
}
|
||||
|
||||
determinePreviousMessageIds(chatMessageList)
|
||||
|
||||
handleExpandableSystemMessages(chatMessageList)
|
||||
|
||||
if (chatMessageList.isNotEmpty() &&
|
||||
ChatMessage.SystemMessageType.CLEARED_CHAT == chatMessageList[0].systemMessageType
|
||||
) {
|
||||
if (ChatMessage.SystemMessageType.CLEARED_CHAT == chatMessageList[0].systemMessageType) {
|
||||
adapter?.clear()
|
||||
adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user