Przeglądaj źródła

Remove unnecessary usages of let { }

Aidan Follestad 5 lat temu
rodzic
commit
4e5684cc85

+ 6 - 8
core/src/main/java/com/afollestad/materialdialogs/MaterialDialog.kt

@@ -403,14 +403,12 @@ class MaterialDialog(
   }
 
   private fun setWindowConstraints() {
-    window?.let {
-      dialogBehavior.setWindowConstraints(
-          context = windowContext,
-          maxWidth = maxWidth,
-          window = it,
-          view = view
-      )
-    }
+    dialogBehavior.setWindowConstraints(
+        context = windowContext,
+        maxWidth = maxWidth,
+        window = window!!,
+        view = view
+    )
   }
 
   private fun invalidateBackgroundColorAndRadius() {