From 036cf7c5905fc135f43e118894f098092cc9b427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Tue, 2 Nov 2021 12:04:53 +0100 Subject: [PATCH] Some refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed spelling issues - Removed unneded boolean comparisons - Improve code readability by reformatting Signed-off-by: Tim Krüger --- .../com/nextcloud/talk/controllers/ChatController.kt | 4 ++-- .../talk/controllers/ConversationInfoController.kt | 10 ++++++++-- 2 files changed, 10 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 7569f76f3..fa3e50144 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -585,7 +585,7 @@ class ChatController(args: Bundle) : if (layoutManager!!.findFirstCompletelyVisibleItemPosition() < newMessagesCount) { newMessagesCount = 0 - if (binding.popupBubbleView.isShown == true) { + if (binding.popupBubbleView.isShown) { binding.popupBubbleView.hide() } } @@ -640,7 +640,7 @@ class ChatController(args: Bundle) : } } catch (npe: NullPointerException) { // view binding can be null - // since this is called asynchrously and UI might have been destroyed in the meantime + // since this is called asynchronously and UI might have been destroyed in the meantime Log.i(TAG, "UI destroyed - view binding already gone") } } diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt index 873946d95..e1ffca885 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt @@ -1007,8 +1007,14 @@ class ConversationInfoController(args: Bundle) : R.drawable.ic_lock_grey600_24px, context!!.getString(R.string.nc_attendee_pin, participant.attendeePin) ), - BasicListItemWithImage(R.drawable.ic_pencil_grey600_24dp, context!!.getString(R.string.nc_promote)), - BasicListItemWithImage(R.drawable.ic_pencil_grey600_24dp, context!!.getString(R.string.nc_demote)), + BasicListItemWithImage( + R.drawable.ic_pencil_grey600_24dp, + context!!.getString(R.string.nc_promote) + ), + BasicListItemWithImage( + R.drawable.ic_pencil_grey600_24dp, + context!!.getString(R.string.nc_demote) + ), BasicListItemWithImage( R.drawable.ic_delete_grey600_24dp, context!!.getString(R.string.nc_remove_participant)