Add permission warning banner and save-time dialog for alarms and reminders#159
Merged
Conversation
Show an inline ListItem-style warning banner when any reminder or alarm is active but POST_NOTIFICATIONS or SCHEDULE_EXACT_ALARM is missing. The banner auto-refreshes on every ON_RESUME so it clears once the user grants the permission and returns to the screen. EditAlarmScreen: permission state replaces the old one-shot `remember` check; save button intercepts when permissions are missing and shows a dialog with "Open Settings" (saves + navigates to system settings) and "Save anyway" (saves without fixing). Banner appears throughout the configure step unconditionally when either permission is absent. RemindersScreen / SettingsScreen (RemindersSubScreen): upgraded from a single one-shot canScheduleExactAlarms check to live, resumable state for both POST_NOTIFICATIONS and SCHEDULE_EXACT_ALARM. Added a notification-permission banner that appears when any reminder toggle is on. Existing exact-alarm banner is preserved; semantics role order corrected (role before clickable per CI rules). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9
SettingsScreen.kt declared anyEnabled twice in the same Column lambda scope (once for the notification banner, once for the reminder-time row), causing a Kotlin conflicting-declarations compile error. Removed the second declaration; both uses now share the first. Also adds the missing changelog/unreleased/reminder-permission-warnings.json fragment that the changelog-check CI job requires. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST_NOTIFICATIONSandSCHEDULE_EXACT_ALARM. An inlineListItembanner appears whenever either permission is missing. The Save button intercepts with an AlertDialog: "Open Settings" saves then navigates to the relevant system settings, "Save anyway" saves without fixing.POST_NOTIFICATIONSbanner (shown when any reminder toggle is enabled and the permission is missing) alongside the existing exact-alarm banner. Both banners now use live, refreshable state instead of a one-shotremember.RemindersScreen.Test plan
POST_NOTIFICATIONSis denied. Confirm the permission banner appears in the configure step.SCHEDULE_EXACT_ALARMpermission. Confirm exact-alarm banner appears.🤖 Generated with Claude Code
https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9
Generated by Claude Code