From 87e7e093f7967cb70d64effeef00b9c0cba0242b Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sun, 20 Sep 2026 00:02:49 -0400 Subject: [PATCH] Revert "don't invalidate UP controller" This reverts commit 73c4a7d07fdf112b800b86f154e537f8153e3c99. --- lib/controllers/unified_push.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/controllers/unified_push.dart b/lib/controllers/unified_push.dart index 47354ad..f637156 100644 --- a/lib/controllers/unified_push.dart +++ b/lib/controllers/unified_push.dart @@ -103,7 +103,7 @@ class UnifiedPushController extends AsyncNotifier { await ref .watch(PushKeyController.provider(instance).notifier) .set(null); - state = .data(false); + ref.invalidateSelf(); }, ); @@ -139,7 +139,7 @@ class UnifiedPushController extends AsyncNotifier { vapid: capabilities.webpush?.vapid, ); - state = .data(true); + if (!alreadyRegistered) ref.invalidateSelf(); } Future deregister() async { @@ -157,7 +157,7 @@ class UnifiedPushController extends AsyncNotifier { } await UnifiedPush.unregister(clientState.deviceId!); - state = .data(false); + ref.invalidateSelf(); } static final provider = AsyncNotifierProvider(