From 5ed6e5e0830c726ff3da4f1803415c03e115307a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sun, 23 Aug 2026 22:13:38 -0400 Subject: [PATCH] slight cleanup `onNewEndpoint` is still not getting called for some reason (help appreciated) --- lib/controllers/unified_push.dart | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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();