Commit b3c5e5a
fix: stop the fallback sound when notifications are denied
Implement fallbackEffects(_:authorizationState:) and route every
out-of-band fallback call site through it: FeedCoordinator's denied
branch, its just-declined-the-prompt branch, and the store's
unauthorized scheduleUserNotification fallback. Only .denied strips the
sound; .notDetermined (deferred prompt) and granted states keep the
audible fallback, and delivery-failure fallbacks for authorized users
are unchanged.
This is the TCC-independent half of #5650: the Focus assertion-store
gate cannot run on a default install (the store needs Full Disk
Access), but a user who turned cmux notifications off has already asked
for silence - including during Focus, which suppresses banners through
the same denied-shaped fallback. The Focus gate remains as best-effort
for FDA installs and the app-frontmost suppressed-banner path.
This is the green half: the denied-authorization test from the previous
commit now passes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8e7a61a commit b3c5e5a
3 files changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
| 922 | + | |
| 923 | + | |
922 | 924 | | |
923 | 925 | | |
924 | 926 | | |
925 | 927 | | |
926 | 928 | | |
927 | | - | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
928 | 933 | | |
929 | 934 | | |
930 | 935 | | |
| |||
933 | 938 | | |
934 | 939 | | |
935 | 940 | | |
936 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
937 | 947 | | |
938 | 948 | | |
939 | 949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 | | |
452 | 455 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
2094 | | - | |
| 2094 | + | |
2095 | 2095 | | |
2096 | 2096 | | |
2097 | 2097 | | |
| |||
0 commit comments