Skip to content

Hide notification permission alert after toggling notifications#138

Merged
DRadmir merged 4 commits intomainfrom
116-notifications-permissions-alert
Apr 14, 2026
Merged

Hide notification permission alert after toggling notifications#138
DRadmir merged 4 commits intomainfrom
116-notifications-permissions-alert

Conversation

@DRadmir
Copy link
Copy Markdown
Contributor

@DRadmir DRadmir commented Apr 13, 2026

Split notificationEnable() into enableNotifications() and disableNotifications(). Both call stopAskNotifications() to prevent the global prompt from flashing, and disableNotifications() ensures the alert does not reappear after the user explicitly opts out.

Closes #116

Split notificationEnable() into enableNotifications() and
disableNotifications(). Both call stopAskNotifications() to prevent
the global prompt from flashing, and disableNotifications() ensures
the alert does not reappear after the user explicitly opts out.

Closes #116
@DRadmir DRadmir self-assigned this Apr 13, 2026
DRadmir added 3 commits April 14, 2026 14:03
On pre-TIRAMISU devices no runtime permission is needed, so
PushRequest now calls onNotificationEnable() directly instead
of showing a custom AlertDialog.
Replace accompanist permissions flow with the AndroidX ActivityResult API and a runtime check. For pre-TIRAMISU devices or when POST_NOTIFICATIONS is already granted, the onNotificationEnable callback is invoked immediately. Otherwise a RequestPermission launcher is used to request POST_NOTIFICATIONS and invoke onNotificationEnable or onDismiss based on the result. Removed the custom AlertDialog/Accompanist-based permission handling and added ContextCompat/LocalContext checks.
@DRadmir DRadmir force-pushed the 116-notifications-permissions-alert branch from 160b894 to a628666 Compare April 14, 2026 12:12
@DRadmir DRadmir merged commit 8827f8a into main Apr 14, 2026
3 checks passed
@DRadmir DRadmir deleted the 116-notifications-permissions-alert branch April 14, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notifications permissions alert

2 participants