fix(notifications): sync background push toggle when OS permission denied#1156
Merged
7w1 merged 1 commit intoJul 20, 2026
Merged
Conversation
…d push toggle The native plugin returns Option<bool> (true=granted, false=denied, null=never-asked) but the JS bindings typed it as Promise<boolean>, flattening the tri-state. Fix the types to Promise<boolean | null>, add a non-prompting isUnifiedPushPermissionGranted, and pre-check permission at startup: if denied, sync backgroundPushEnabled to false and skip registration; if never-asked or granted, proceed (prompting if needed). On registration failure, re-check and sync if now denied.
eleboucher
force-pushed
the
fix/background-push-toggle-permission-denial
branch
from
July 20, 2026 12:47
c5fa7ac to
753e87c
Compare
7w1
approved these changes
Jul 20, 2026
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.
Description
On mobile, backgroundPushEnabled defaults to true. Startup auto-registration threw on permission denial but only logged a warning, leaving the toggle ON even though push was non-functional. Now syncs backgroundPushEnabled to false and clears the provider when registration fails due to denied/dismissed permission. Transient errors are left alone.
Type of change
Checklist:
AI disclosure: