mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-24 17:13:41 -04:00
improved toggle reset in toggleRoundRobin
This commit is contained in:
@@ -158,10 +158,10 @@ export class SeekerComponent implements OnInit, HasPendingChanges {
|
||||
});
|
||||
if (!confirmed) {
|
||||
// The toggle already flipped its internal state to false.
|
||||
// Sync our signal to false first, then restore to true in the next tick
|
||||
// Sync our signal to false first, then restore to true in the next microtask
|
||||
// so Angular detects an actual change and pushes it back to the toggle.
|
||||
this.useRoundRobin.set(false);
|
||||
setTimeout(() => this.useRoundRobin.set(true));
|
||||
queueMicrotask(() => this.useRoundRobin.set(true));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user