diff --git a/lib/controllers/unified_push.dart b/lib/controllers/unified_push.dart index b4aa107..3097e6d 100644 --- a/lib/controllers/unified_push.dart +++ b/lib/controllers/unified_push.dart @@ -34,20 +34,6 @@ class UnifiedPushController extends AsyncNotifier { lang: "en", pushKey: endpoint.pubKeySet!.pubKey, ), - - // Pusher( - // appDisplayName: , - // data: { - // "url": endpoint.url, - // "auth": endpoint.pubKeySet.auth, - // "format": "event_id_only", - // }, - // deviceDisplayName: "Nexus", - // kind: "org.matrix.msc4174.webpush", - // lang: WidgetsBinding.instance.platformDispatcher.locale - // .toLanguageTag(), - // pushkey: endpoint.pubKeySet.publicKey, - // ), ); }, onMessage: (message, instance) async { @@ -73,11 +59,10 @@ class UnifiedPushController extends AsyncNotifier { return registered; } - Future register([bool early = false]) async { + Future register([bool alreadyRegistered = false]) async { final clientState = ref.watch(ClientStateController.provider); if (clientState?.deviceId == null) ref.invalidateSelf(); - final alreadyRegistered = early ? true : await future; final capabilities = await ref .watch(ClientController.provider.notifier) .getCapabilities();