slight cleanup
`onNewEndpoint` is still not getting called for some reason (help appreciated)
This commit is contained in:
parent
7218eb5195
commit
5ed6e5e083
1 changed files with 1 additions and 16 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue