mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 18:55:05 +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);
|
adapter.addToStart(unreadChatMessage, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isThereANewNotice = shouldAddNewMessagesNotice || adapter.getMessagePositionByIdInReverse("-1") != -1;
|
||||||
|
|
||||||
for (int i = 0; i < chatMessageList.size(); i++) {
|
for (int i = 0; i < chatMessageList.size(); i++) {
|
||||||
chatMessage = chatMessageList.get(i);
|
chatMessage = chatMessageList.get(i);
|
||||||
|
|
||||||
@ -1179,7 +1181,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean shouldScroll =
|
boolean shouldScroll =
|
||||||
!shouldAddNewMessagesNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
!isThereANewNotice && !shouldAddNewMessagesNotice && layoutManager.findFirstVisibleItemPosition() == 0 ||
|
||||||
(adapter != null && adapter.getItemCount() == 0);
|
(adapter != null && adapter.getItemCount() == 0);
|
||||||
|
|
||||||
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user