improved toggle reset in toggleRoundRobin

This commit is contained in:
Flaminel
2026-03-21 21:49:10 +02:00
parent bc8aa10588
commit f74ec45ca6

View File

@@ -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;
}
}