From f347fe1255099fa1ea7285b54166eb49144aaee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Tue, 6 Sep 2022 17:29:24 +0200 Subject: [PATCH] Remove unnecessary elvis operator (?:) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Krüger --- .../java/com/nextcloud/talk/controllers/ChatController.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 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 11f68c938..ce8ec80a2 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -676,7 +676,7 @@ class ChatController(args: Bundle) : }) val filters = arrayOfNulls(1) - val lengthFilter = CapabilitiesUtilNew.getMessageMaxLength(conversationUser) ?: MESSAGE_MAX_LENGTH + val lengthFilter = CapabilitiesUtilNew.getMessageMaxLength(conversationUser) filters[0] = InputFilter.LengthFilter(lengthFilter) binding.messageInputView.inputEditText?.filters = filters @@ -1724,7 +1724,7 @@ class ChatController(args: Bundle) : eventBus.register(this) if (conversationUser?.userId != "?" && - CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "mention-flag") ?: false && + CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "mention-flag") && activity != null ) { activity?.findViewById(R.id.toolbar)?.setOnClickListener { v -> showConversationInfoScreen() } @@ -3244,7 +3244,6 @@ class ChatController(args: Bundle) : private const val POP_CURRENT_CONTROLLER_DELAY: Long = 100 private const val LOBBY_TIMER_DELAY: Long = 5000 private const val HTTP_CODE_OK: Int = 200 - private const val MESSAGE_MAX_LENGTH: Int = 1000 private const val AGE_THREHOLD_FOR_DELETE_MESSAGE: Int = 21600000 // (6 hours in millis = 6 * 3600 * 1000) private const val REQUEST_CODE_CHOOSE_FILE: Int = 555 private const val REQUEST_CODE_SELECT_CONTACT: Int = 666