ChatController: fix scroll to unread messages

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-06-07 11:38:10 +02:00
parent 52b157d454
commit 1ee92e39dd
No known key found for this signature in database
GPG Key ID: 2585783189A62105

View File

@ -2314,7 +2314,7 @@ class ChatController(args: Bundle) :
var chatMessage: ChatMessage
val shouldAddNewMessagesNotice = timeout == 0 && adapter?.itemCount ?: 0 > 0 && chatMessageList.size > 0
val shouldAddNewMessagesNotice = (adapter?.itemCount ?: 0) > 0 && chatMessageList.isNotEmpty()
if (shouldAddNewMessagesNotice) {
val unreadChatMessage = ChatMessage()