Skip to content

Commit e3747e5

Browse files
committed
refactor[UP]: refactor pushHelper
1 parent 2747ab7 commit e3747e5

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
}
@@ -482,7 +482,7 @@ class BackgroundPush {
482482
);
483483
// UP may strip the devices list
484484
data['devices'] ??= [];
485-
await pushHelper(
485+
await PushHelper.pushHelper(
486486
PushNotification.fromJson(data),
487487
clients: clients,
488488
instance: instance,

0 commit comments

Comments
 (0)