implemented a guided notification permission flow triggered on the first Talk visit
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user