From ecaf5a7f77149983798cb2addaa85bc77bdbd3e1 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Sat, 2 May 2026 08:58:46 +0200 Subject: [PATCH] fix dedupe --- .../domain/services/native_gatekeeper_replicator.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/weblibre/lib/features/intent_gatekeeper/domain/services/native_gatekeeper_replicator.dart b/apps/weblibre/lib/features/intent_gatekeeper/domain/services/native_gatekeeper_replicator.dart index 09421c31..9f3436fe 100644 --- a/apps/weblibre/lib/features/intent_gatekeeper/domain/services/native_gatekeeper_replicator.dart +++ b/apps/weblibre/lib/features/intent_gatekeeper/domain/services/native_gatekeeper_replicator.dart @@ -97,13 +97,14 @@ class NativeIntentGatekeeperReplicator return inFlight; } - final future = _syncPendingAllowsInternal(); - _pendingAllowSync = future.whenComplete(() { - if (identical(_pendingAllowSync, future)) { + late final Future wrapped; + wrapped = _syncPendingAllowsInternal().whenComplete(() { + if (identical(_pendingAllowSync, wrapped)) { _pendingAllowSync = null; } }); - return _pendingAllowSync!; + _pendingAllowSync = wrapped; + return wrapped; } @override