Browse Source

code format kotlin code

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 years ago
parent
commit
0e92e5ea2d

+ 1 - 2
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -298,8 +298,7 @@ class ChatController(args: Bundle) :
     }
 
     private fun getRoomInfo() {
-        val shouldRepeat = CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "webinary-lobby") ?:
-        false
+        val shouldRepeat = CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "webinary-lobby")
         if (shouldRepeat) {
             checkingLobbyStatus = true
         }

+ 6 - 12
app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt

@@ -88,7 +88,11 @@ import java.util.Locale
 import javax.inject.Inject
 
 @AutoInjector(NextcloudTalkApplication::class)
-class ConversationInfoController(args: Bundle) : NewBaseController(R.layout.controller_conversation_info, args),
+class ConversationInfoController(args: Bundle) :
+    NewBaseController(
+        R.layout.controller_conversation_info,
+        args
+    ),
     FlexibleAdapter
     .OnItemClickListener {
     private val binding: ControllerConversationInfoBinding by viewBinding(ControllerConversationInfoBinding::bind)
@@ -387,17 +391,7 @@ class ConversationInfoController(args: Bundle) : NewBaseController(R.layout.cont
         adapter!!.updateDataSet(recyclerViewItems)
     }
 
-    /**
-    override fun getTitle(): String? {
-    return if (hasAvatarSpacing) {
-    " " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)
-    } else {
-    resources!!.getString(R.string.nc_conversation_menu_conversation_info)
-    }
-    }
-     */
-
-    override val title: String?
+    override val title: String
         get() =
             if (hasAvatarSpacing) {
                 " " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)

+ 7 - 4
app/src/main/java/com/nextcloud/talk/controllers/base/NewBaseController.kt

@@ -138,7 +138,8 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
                     activity.binding.searchToolbar.visibility = View.VISIBLE
                     activity.binding.searchText.hint = searchHint
                     activity.binding.toolbar.visibility = View.GONE
-                    //layoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
+                    // layoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout
+                    // .LayoutParams.SCROLL_FLAG_SNAP | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
                     layoutParams.scrollFlags = 0
                     activity.binding.appBar.stateListAnimator = AnimatorInflater.loadStateListAnimator(
                         activity.binding.appBar.context,
@@ -157,14 +158,16 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
                 if (resources != null) {
                     if (showSearchBar) {
                         DisplayUtils.applyColorToStatusBar(
-                            activity, ResourcesCompat.getColor(
+                            activity,
+                            ResourcesCompat.getColor(
                                 resources!!,
                                 R.color.bg_default, null
                             )
                         )
                     } else {
                         DisplayUtils.applyColorToStatusBar(
-                            activity, ResourcesCompat.getColor(
+                            activity,
+                            ResourcesCompat.getColor(
                                 resources!!,
                                 R.color.appbar, null
                             )
@@ -256,4 +259,4 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
     companion object {
         private val TAG = BaseController::class.java.simpleName
     }
-}
+}