fix(profiles): binder settle, active-id, and rebind correctness

This commit is contained in:
edde746
2026-07-02 11:41:25 +02:00
parent 2025e1f9fd
commit f9123eb40f
13 changed files with 446 additions and 144 deletions
+4 -1
View File
@@ -106,7 +106,10 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
_expectedVisibleServerIds!.containsAll(ids)) {
return;
}
_expectedVisibleServerIds = ids;
// Defensive copy: callers (the binder) keep mutating their set after
// handing it over, which would silently edit provider state and defeat
// the idempotence check above.
_expectedVisibleServerIds = ids == null ? null : Set.of(ids);
safeNotifyListeners();
}