From 3cff414a91afb79d125db3e383c5d5d56fc219d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20N=C3=BCsse?= Date: Wed, 18 Oct 2023 00:15:15 +0200 Subject: [PATCH] fix requesting alarm permission --- .../rcloneexplorer/Activities/OnboardingActivity.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/Activities/OnboardingActivity.kt b/app/src/main/java/ca/pkay/rcloneexplorer/Activities/OnboardingActivity.kt index 5c1e4faa..142e6d44 100644 --- a/app/src/main/java/ca/pkay/rcloneexplorer/Activities/OnboardingActivity.kt +++ b/app/src/main/java/ca/pkay/rcloneexplorer/Activities/OnboardingActivity.kt @@ -51,7 +51,6 @@ class OnboardingActivity : AppIntro2() { } else { false } - } else { return context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED } @@ -205,15 +204,12 @@ class OnboardingActivity : AppIntro2() { } override fun onCanRequestNextPage(): Boolean { - if(!isStorageSlide && !isAlarmSlide) { - return super.onCanRequestNextPage() - } - if(storageGranted) { + if(isStorageSlide && storageGranted) { return true } - if (alarmRequested) { + if (isAlarmSlide && alarmRequested) { return true } @@ -232,7 +228,8 @@ class OnboardingActivity : AppIntro2() { } requestAlarmPermission() } - return false + + return super.onCanRequestNextPage() } override fun attachBaseContext(newBase: Context) {