slight cleanup

`onNewEndpoint` is still not getting called for some reason (help appreciated)
This commit is contained in:
Henry Hiles 2026-08-23 22:13:38 -04:00
commit 5ed6e5e083
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -34,20 +34,6 @@ class UnifiedPushController extends AsyncNotifier<bool> {
lang: "en", lang: "en",
pushKey: endpoint.pubKeySet!.pubKey, 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 { onMessage: (message, instance) async {
@ -73,11 +59,10 @@ class UnifiedPushController extends AsyncNotifier<bool> {
return registered; return registered;
} }
Future<void> register([bool early = false]) async { Future<void> register([bool alreadyRegistered = false]) async {
final clientState = ref.watch(ClientStateController.provider); final clientState = ref.watch(ClientStateController.provider);
if (clientState?.deviceId == null) ref.invalidateSelf(); if (clientState?.deviceId == null) ref.invalidateSelf();
final alreadyRegistered = early ? true : await future;
final capabilities = await ref final capabilities = await ref
.watch(ClientController.provider.notifier) .watch(ClientController.provider.notifier)
.getCapabilities(); .getCapabilities();