Răsfoiți Sursa

combine nested ifs

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 ani în urmă
părinte
comite
faf9ce2884

+ 6 - 5
app/src/main/java/com/nextcloud/talk/controllers/LockedController.kt

@@ -158,11 +158,12 @@ class LockedController : NewBaseController(R.layout.controller_locked) {
         super.onActivityResult(requestCode, resultCode, data)
         if (requestCode == REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS) {
             if (resultCode == Activity.RESULT_OK) {
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-                    if (SecurityUtils.checkIfWeAreAuthenticated(appPreferences!!.screenLockTimeout)) {
-                        Log.d(TAG, "All went well, dismiss locked controller")
-                        router.popCurrentController()
-                    }
+                if (
+                    Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
+                    SecurityUtils.checkIfWeAreAuthenticated(appPreferences!!.screenLockTimeout)
+                ) {
+                    Log.d(TAG, "All went well, dismiss locked controller")
+                    router.popCurrentController()
                 }
             } else {
                 Log.d(TAG, "Authorization failed")