Skip to content

Commit

Permalink
fix requesting alarm permission
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Oct 17, 2023
1 parent ae4391b commit 3cff414
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class OnboardingActivity : AppIntro2() {
} else {
false
}

} else {
return context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED
}
Expand Down Expand Up @@ -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
}

Expand All @@ -232,7 +228,8 @@ class OnboardingActivity : AppIntro2() {
}
requestAlarmPermission()
}
return false

return super.onCanRequestNextPage()
}

override fun attachBaseContext(newBase: Context) {
Expand Down

0 comments on commit 3cff414

Please sign in to comment.