From 3efcbe2a3929abfce521cec921ed73bb266e32e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 26 Jan 2023 14:12:04 +0100 Subject: [PATCH] Simplify assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .../com/nextcloud/talk/controllers/ChatController.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index 59225b3d5..f279631aa 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -2151,13 +2151,11 @@ class ChatController(args: Bundle) : return } - webSocketInstance = - if (WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) != null) { - WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) - } else { - Log.d(TAG, "magicWebSocketInstance became null") - null - } + webSocketInstance = WebSocketConnectionHelper.getMagicWebSocketInstanceForUserId(conversationUser.id!!) + + if (webSocketInstance == null) { + Log.d(TAG, "magicWebSocketInstance became null") + } } fun pullChatMessages(lookIntoFuture: Int, setReadMarker: Int = 1, xChatLastCommonRead: Int? = null) {