From bb4bccbd08f41dac0aee9689cb228424d53a05e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Tue, 6 Sep 2022 17:44:37 +0200 Subject: [PATCH] Simplify boolean expressions 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 ff226f128..40fdaafa5 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -2073,7 +2073,7 @@ class ChatController(args: Bundle) : myFirstMessage = message try { - if (binding.popupBubbleView.isShown == true) { + if (binding.popupBubbleView.isShown) { binding.popupBubbleView.hide() } @@ -2091,7 +2091,7 @@ class ChatController(args: Bundle) : if (Integer.toString(code).startsWith("2")) { myFirstMessage = message - if (binding.popupBubbleView.isShown == true) { + if (binding.popupBubbleView.isShown) { binding.popupBubbleView.hide() } @@ -2425,7 +2425,7 @@ class ChatController(args: Bundle) : if (!binding.popupBubbleView.isShown) { newMessagesCount = 1 binding.popupBubbleView.show() - } else if (binding.popupBubbleView.isShown == true) { + } else if (binding.popupBubbleView.isShown) { newMessagesCount++ } } else { @@ -3088,7 +3088,7 @@ class ChatController(args: Bundle) : val isOlderThanSixHours = message .createdAt - .before(Date(System.currentTimeMillis() - AGE_THREHOLD_FOR_DELETE_MESSAGE)) == true + .before(Date(System.currentTimeMillis() - AGE_THREHOLD_FOR_DELETE_MESSAGE)) return when { !isUserAllowedByPrivileges -> false