2f6a24344c49

fix: surface update-notification opt-in so it actually gets granted (v2.9.25)

The 'update available' notification (UpdateCheckWorker.postUpdateNotification) is built and correct, but on Android 13+ it silently no-ops until POST_NOTIFICATIONS is granted. The only grant path was NotificationOptIn(), rendered at the very bottom of the Update screen — below the Download/Install button and an xxl spacer — so users install and leave without ever seeing 'Allow update notifications', the permission stays denied, and the background notification never appears. - Move NotificationOptIn() to just under the 'Installed vX · latest vY' subtitle, the high-context moment, so it's seen before the user commits to installing - Give it a self-contained leading spacer that renders only when not-yet-granted (the composable still returns early once permission is granted, so no dead gap)

time
2026-08-01 21:30 UTC · 2 months ago
machine
koh2
parent
0c23ea982690
2 files VERSION+1 −1app/src/main/java/com/peachpasswords/ui/updates/UpdateScreen.kt+7 −1
VERSION+1 −1
@@ -1 +1 @@1-2.9.241+2.9.25

view file

app/src/main/java/com/peachpasswords/ui/updates/UpdateScreen.kt+7 −1
@@ -235,6 +235,12 @@235235                     style = PeachType.labelMono,236236                 )237237 238+                // Android 13+ won't post the "update available" notification without an239+                // explicit grant, so ask here — at the top, next to the version info that240+                // explains why — instead of burying it below the install button where the241+                // user installs and leaves without ever seeing it.242+                NotificationOptIn()243+238244                 state.error?.let { message ->239245                     Spacer(Modifier.height(PeachSpacing.md))240246                     Box(@@ -288,7 +294,6 @@288294                 }289295 290296                 Spacer(Modifier.height(PeachSpacing.xl))291-                NotificationOptIn()292297                 Spacer(Modifier.height(PeachSpacing.xxl))293298             }294299         }@@ -314,6 +319,7 @@314319     val launcher = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) {315320         granted = it316321     }322+    Spacer(Modifier.height(PeachSpacing.lg))317323     SectionLabel("NOTIFICATIONS")318324     Text(319325         "Peach can tell you when a new version is out. Nothing else uses this.",

view file