fix(mobile): restore notification plugin init (#28284)
#27666 removed LocalNotificationService with the legacy stack, which was the only place calling FlutterLocalNotificationsPlugin().initialize(). without it, ios never prompts for the notification perm on fresh installs so background_downloader notifications get dropped silently. restores the init in the same spot the deleted call used to live.pull/28302/head
parent
e2ec04e86c
commit
238895cad9
|
|
@ -10,6 +10,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/constants/constants.dart';
|
||||
import 'package:immich_mobile/constants/locales.dart';
|
||||
|
|
@ -163,6 +164,13 @@ class ImmichAppState extends ConsumerState<ImmichApp> with WidgetsBindingObserve
|
|||
}
|
||||
}
|
||||
SystemChrome.setSystemUIOverlayStyle(overlayStyle);
|
||||
|
||||
await FlutterLocalNotificationsPlugin().initialize(
|
||||
const InitializationSettings(
|
||||
android: AndroidInitializationSettings('@drawable/notification_icon'),
|
||||
iOS: DarwinInitializationSettings(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<DeepLink> _deepLinkBuilder(PlatformDeepLink deepLink) async {
|
||||
|
|
|
|||
Loading…
Reference in New Issue