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