Skip to content

Commit a9ed453

Browse files
committed
refactor[UP]: refactor pushHelper
1 parent 01e0724 commit a9ed453

File tree

2 files changed

+317
-310
lines changed

2 files changed

+317
-310
lines changed

lib/utils/background_push.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class BackgroundPush {
8181
);
8282
Logs().v('Flutter Local Notifications initialized');
8383
firebase?.setListeners(
84-
onMessage: (message) => pushHelper(
84+
onMessage: (message) => PushHelper.pushHelper(
8585
PushNotification.fromJson(
8686
Map<String, dynamic>.from(message['data'] ?? message),
8787
),
@@ -260,7 +260,7 @@ class BackgroundPush {
260260
if (endpoint != null) {
261261
matrix!.store.setString(
262262
clients.first.clientName + SettingKeys.unifiedPushEndpoint,
263-
endpoint);
263+
endpoint,);
264264
matrix!.store.remove(SettingKeys.unifiedPushEndpoint);
265265
}
266266

@@ -269,7 +269,7 @@ class BackgroundPush {
269269
if (registered != null) {
270270
matrix!.store.setBool(
271271
clients.first.clientName + SettingKeys.unifiedPushRegistered,
272-
registered);
272+
registered,);
273273
matrix!.store.remove(SettingKeys.unifiedPushRegistered);
274274
}
275275
}
@@ -477,7 +477,7 @@ class BackgroundPush {
477477
);
478478
// UP may strip the devices list
479479
data['devices'] ??= [];
480-
await pushHelper(
480+
await PushHelper.pushHelper(
481481
PushNotification.fromJson(data),
482482
clients: clients,
483483
instance: instance,

0 commit comments

Comments
 (0)