mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-10 08:00:57 +00:00
Fix endless loading of messages
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
31ce180c6d
commit
ec44092676
@ -593,17 +593,18 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
lobbyView.setVisibility(View.GONE);
|
||||
messagesListView.setVisibility(View.VISIBLE);
|
||||
messageInput.setVisibility(View.VISIBLE);
|
||||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(0);
|
||||
} else {
|
||||
pullChatMessages(1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
lobbyView.setVisibility(View.GONE);
|
||||
messagesListView.setVisibility(View.VISIBLE);
|
||||
messageInput.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(0);
|
||||
} else {
|
||||
pullChatMessages(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void showBrowserScreen(BrowserController.BrowserType browserType) {
|
||||
@ -813,15 +814,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
ApplicationWideCurrentRoomHolder.getInstance().setSession(currentCall.getSessionId());
|
||||
startPing();
|
||||
|
||||
checkLobbyState();
|
||||
|
||||
setupWebsocket();
|
||||
|
||||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(0);
|
||||
} else {
|
||||
pullChatMessages(1);
|
||||
}
|
||||
checkLobbyState();
|
||||
|
||||
if (magicWebSocketInstance != null) {
|
||||
magicWebSocketInstance.joinRoomWithRoomTokenAndSession(roomToken,
|
||||
@ -873,8 +867,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
|
||||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
dispose();
|
||||
|
||||
checkingLobbyStatus = false;
|
||||
|
||||
if (lobbyTimerHandler != null) {
|
||||
@ -1011,6 +1003,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
fieldMap.put("limit", 10);
|
||||
fieldMap.put("setReadMarker", 1);
|
||||
|
||||
Log.d("MARIO lookIntoFuture", String.valueOf(lookIntoFuture));
|
||||
|
||||
int lastKnown;
|
||||
if (lookIntoFuture > 0) {
|
||||
lastKnown = globalLastKnownFutureMessageId;
|
||||
|
Loading…
Reference in New Issue
Block a user