mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
Fix issued with unread messages
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
0c73a75990
commit
893c014cb8
@ -167,6 +167,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
private String roomId;
|
||||
private boolean voiceOnly;
|
||||
private boolean isFirstMessagesProcessing = true;
|
||||
private boolean havePulledFutureBefore = false;
|
||||
private boolean isLeavingForConversation;
|
||||
private boolean isLinkPreviewAllowed;
|
||||
private boolean wasDetached;
|
||||
@ -681,6 +682,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
currentCall = callOverall.getOcs().getData();
|
||||
ApplicationWideCurrentRoomHolder.getInstance().setSession(currentCall.getSessionId());
|
||||
startPing();
|
||||
havePulledFutureBefore = false;
|
||||
|
||||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(0);
|
||||
} else {
|
||||
@ -739,6 +742,11 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
dispose();
|
||||
|
||||
if (magicWebSocketInstance != null && currentCall != null) {
|
||||
magicWebSocketInstance.joinRoomWithRoomTokenAndSession("", currentCall.getSessionId());
|
||||
}
|
||||
|
||||
if (!isDestroyed() && !isBeingDestroyed() && !wasDetached) {
|
||||
getRouter().popCurrentController();
|
||||
}
|
||||
@ -843,16 +851,14 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
return;
|
||||
}
|
||||
|
||||
if (lookIntoFuture == 1 && magicWebSocketInstance != null) {
|
||||
if (havePulledFutureBefore && lookIntoFuture == 1 && magicWebSocketInstance != null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!lookingIntoFuture && lookIntoFuture > 0) {
|
||||
lookingIntoFuture = true;
|
||||
}
|
||||
|
||||
if (lookIntoFuture > 1) {
|
||||
lookIntoFuture = 1;
|
||||
havePulledFutureBefore = true;
|
||||
}
|
||||
|
||||
Map<String, Integer> fieldMap = new HashMap<>();
|
||||
|
Loading…
Reference in New Issue
Block a user