Эх сурвалжийг харах

Some refactoring

- Removed spelling issues
- Removed unneded boolean comparisons
- Improve code readability by reformatting

Signed-off-by: Tim Krüger <t@timkrueger.me>
Tim Krüger 3 жил өмнө
parent
commit
036cf7c590

+ 2 - 2
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")
                 }
             }

+ 8 - 2
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)