From 953f71da61821803d112d6c55bcca5f00ccd0732 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Sat, 11 Jan 2025 00:21:51 +0800 Subject: [PATCH] fix: Adapt to upstream changes --- pub/flutter_alien_signals/lib/src/_internal/utils.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pub/flutter_alien_signals/lib/src/_internal/utils.dart b/pub/flutter_alien_signals/lib/src/_internal/utils.dart index ae03876..8a1f2ea 100644 --- a/pub/flutter_alien_signals/lib/src/_internal/utils.dart +++ b/pub/flutter_alien_signals/lib/src/_internal/utils.dart @@ -3,9 +3,8 @@ import 'package:alien_signals/alien_signals.dart'; extension EffectScopeUtils on EffectScope { void Function() on() { final prevScope = activeEffectScope; - final prevTrackId = activeScopeTrackId; - setActiveScope(this, trackId); - return () => setActiveScope(prevScope, prevTrackId); + setActiveScope(this); + return () => setActiveScope(prevScope); } } @@ -13,12 +12,11 @@ extension EffectUtils on Effect { void Function() on([EffectScope? scope]) { final reset = scope?.on(); final prevSub = activeSub; - final prevTrackId = activeTrackId; - setActiveSub(this, nextTrackId()); + setActiveSub(this); startTrack(this); return () { reset?.call(); - setActiveSub(prevSub, prevTrackId); + setActiveSub(prevSub); endTrack(this); }; }