forked from Nexus/nexus
don't invalidate UP controller
This commit is contained in:
parent
57f9498aa3
commit
73c4a7d07f
1 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
await ref
|
await ref
|
||||||
.watch(PushKeyController.provider(instance).notifier)
|
.watch(PushKeyController.provider(instance).notifier)
|
||||||
.set(null);
|
.set(null);
|
||||||
ref.invalidateSelf();
|
state = .data(false);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
vapid: capabilities.webpush?.vapid,
|
vapid: capabilities.webpush?.vapid,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!alreadyRegistered) ref.invalidateSelf();
|
state = .data(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deregister() async {
|
Future<void> deregister() async {
|
||||||
|
|
@ -157,7 +157,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
}
|
}
|
||||||
|
|
||||||
await UnifiedPush.unregister(clientState.deviceId!);
|
await UnifiedPush.unregister(clientState.deviceId!);
|
||||||
ref.invalidateSelf();
|
state = .data(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final provider = AsyncNotifierProvider<UnifiedPushController, bool>(
|
static final provider = AsyncNotifierProvider<UnifiedPushController, bool>(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue