implemented a guided notification permission flow triggered on the first Talk visit

This commit is contained in:
2026-07-06 20:01:45 +02:00
parent 3be0113f93
commit 38a271929c
11 changed files with 211 additions and 30 deletions
+5 -9
View File
@@ -91,15 +91,11 @@ class DownloadManager {
tapOpensFile: false,
);
// Notification permission is normally already granted via the FCM flow at
// login; request best-effort so downloads on a fresh install still notify.
try {
await bd.FileDownloader().permissions.request(
bd.PermissionType.notifications,
);
} on Object catch (e) {
debugPrint('DownloadManager: notification permission request failed: $e');
}
// Deliberately no notification-permission request here: it would fire the
// OS prompt at cold start (before login), which is exactly what we moved
// into the guided first-Talk-visit flow (see maybePromptTalkNotifications).
// Downloads still work without it; their progress notifications simply
// appear once the same POST_NOTIFICATIONS permission is granted there.
}
/// Active or recently finished job for [remotePath], or null if none.