Revert "refactor: Only initialize FlutterLocalNotificationsPlugin once"

This reverts commit d3a13705bd.
This commit is contained in:
krille-chan 2024-08-01 09:47:49 +02:00
commit a928ecec1e
No known key found for this signature in database
2 changed files with 296 additions and 309 deletions

View file

@ -71,7 +71,7 @@ class BackgroundPush {
BackgroundPush._(this.client) {
firebase?.setListeners(
onMessage: (message) => PushHelper.processNotification(
onMessage: (message) => pushHelper(
PushNotification.fromJson(
Map<String, dynamic>.from(message['data'] ?? message),
),
@ -393,7 +393,7 @@ class BackgroundPush {
);
// UP may strip the devices list
data['devices'] ??= [];
await PushHelper.processNotification(
await pushHelper(
PushNotification.fromJson(data),
client: client,
l10n: l10n,