Update version

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-05-27 18:57:15 +02:00
parent 92e56cdef2
commit f13292a1b7
2 changed files with 11 additions and 20 deletions

View File

@ -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

View File

@ -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<String, String> joinRoomHashMap = new HashMap<>();
joinRoomHashMap.put("roomToken", currentRoomToken);
eventBus.post(new WebSocketCommunicationEvent("roomJoined", joinRoomHashMap));
} catch (IOException e) {
e.printStackTrace();
}
}