File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -883,6 +883,9 @@ class TaskFormActivity : BaseActivity() {
883
883
}
884
884
885
885
private fun checkIfShowNotifLayout () {
886
+
887
+ val alarmManager = this .getSystemService(Context .ALARM_SERVICE ) as ? AlarmManager
888
+ var warnAboutInexact = false
886
889
if (! pushNotificationManager.notificationPermissionEnabled() && Build .VERSION .SDK_INT >= 33 ) {
887
890
binding.notificationsDisabledLayout.visibility = View .VISIBLE
888
891
binding.remindersContainer.shouldShowNotifPermission = true
@@ -894,13 +897,11 @@ class TaskFormActivity : BaseActivity() {
894
897
} else {
895
898
binding.remindersContainer.shouldShowNotifPermission = false
896
899
binding.notificationsDisabledLayout.visibility = View .GONE
897
- }
898
900
899
- val alarmManager = this .getSystemService(Context .ALARM_SERVICE ) as ? AlarmManager
900
- var warnAboutInexact = false
901
- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ) {
902
- if (alarmManager?.canScheduleExactAlarms() == false ) {
903
- warnAboutInexact = true
901
+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ) {
902
+ if (alarmManager?.canScheduleExactAlarms() == false ) {
903
+ warnAboutInexact = true
904
+ }
904
905
}
905
906
}
906
907
if (warnAboutInexact) {
You can’t perform that action at this time.
0 commit comments