소스 검색

combine nested ifs

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 년 전
부모
커밋
faf9ce2884
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      app/src/main/java/com/nextcloud/talk/controllers/LockedController.kt

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