From f13292a1b71529e0cf70ccdcdf31cc0390016e1d Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Mon, 27 May 2019 18:57:15 +0200 Subject: [PATCH] Update version Signed-off-by: Mario Danic --- app/build.gradle | 4 +-- .../talk/webrtc/MagicWebSocketInstance.java | 27 +++++++------------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5ad210bba..47ea25db2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,8 +38,8 @@ android { targetSdkVersion 28 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - versionCode 96 - versionName "6.0.3" + versionCode 97 + versionName "6.0.4" flavorDimensions "default" renderscriptTargetApi 19 diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java index 6e8cfff64..ee830d4ae 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebSocketInstance.java @@ -57,7 +57,6 @@ public class MagicWebSocketInstance extends WebSocketListener { private String webSocketTicket; private String resumeId; private String sessionId; - private String ncBackendSession; private boolean hasMCU; private boolean connected; private WebSocketConnectionHelper webSocketConnectionHelper; @@ -149,7 +148,7 @@ public class MagicWebSocketInstance extends WebSocketListener { if (("no_such_session").equals(errorOverallWebSocketMessage.getErrorWebSocketMessage().getCode())) { resumeId = ""; restartWebSocket(); - } else if (("hello_expected") .equals(errorOverallWebSocketMessage.getErrorWebSocketMessage().getCode())) { + } else if (("hello_expected").equals(errorOverallWebSocketMessage.getErrorWebSocketMessage().getCode())) { restartWebSocket(); } @@ -260,23 +259,15 @@ public class MagicWebSocketInstance extends WebSocketListener { } public void joinRoomWithRoomTokenAndSession(String roomToken, String normalBackendSession) { - if (!roomToken.equals(currentRoomToken) || !normalBackendSession.equals(ncBackendSession)) { - ncBackendSession = normalBackendSession; - try { - String message = LoganSquare.serialize(webSocketConnectionHelper.getAssembledJoinOrLeaveRoomModel(roomToken, normalBackendSession)); - if (!connected || reconnecting) { - messagesQueue.add(message); - } else { - internalWebSocket.send(message); - } - } catch (IOException e) { - e.printStackTrace(); + try { + String message = LoganSquare.serialize(webSocketConnectionHelper.getAssembledJoinOrLeaveRoomModel(roomToken, normalBackendSession)); + if (!connected || reconnecting) { + messagesQueue.add(message); + } else { + internalWebSocket.send(message); } - } else if (!roomToken.equals("")) { - HashMap joinRoomHashMap = new HashMap<>(); - joinRoomHashMap.put("roomToken", currentRoomToken); - eventBus.post(new WebSocketCommunicationEvent("roomJoined", joinRoomHashMap)); - + } catch (IOException e) { + e.printStackTrace(); } }