mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-17 17:55:02 +01:00
New notice logic
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
0a0aece7d0
commit
0648ceb44c
@ -1164,6 +1164,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
adapter.addToStart(unreadChatMessage, false);
|
||||
}
|
||||
|
||||
boolean isThereANewNotice = shouldAddNewMessagesNotice || adapter.getMessagePositionByIdInReverse("-1") != -1;
|
||||
|
||||
for (int i = 0; i < chatMessageList.size(); i++) {
|
||||
chatMessage = chatMessageList.get(i);
|
||||
|
||||
@ -1179,7 +1181,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
}
|
||||
|
||||
boolean shouldScroll =
|
||||
!shouldAddNewMessagesNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
||||
!isThereANewNotice && !shouldAddNewMessagesNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
||||
(adapter != null && adapter.getItemCount() == 0);
|
||||
|
||||
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user