fix(raw): a superseded manual-entry open can no longer feed the pickers another device's config
This commit is contained in:
+8
@@ -160,6 +160,9 @@
|
||||
private bool _summaryOk;
|
||||
private bool _open; // guards re-seeding rows on unrelated re-renders
|
||||
|
||||
// Identifies WHICH open a post-await write belongs to; _open alone cannot tell two opens apart.
|
||||
private int _openGeneration;
|
||||
|
||||
// Merged Driver+Device config for each row's address picker — the same blob Test-connect and
|
||||
// RawBrowseModal dial, resolved once per open; null (→ "{}") when the resolve failed: the picker's
|
||||
// browse degrades to its graceful error chip.
|
||||
@@ -175,6 +178,7 @@
|
||||
}
|
||||
if (_open) { return; } // same open, re-render → preserve in-progress rows
|
||||
_open = true;
|
||||
var generation = ++_openGeneration;
|
||||
_rows.Clear();
|
||||
_rows.Add(new RowModel());
|
||||
_summary = null;
|
||||
@@ -186,6 +190,10 @@
|
||||
try
|
||||
{
|
||||
var merged = await Svc.LoadMergedProbeConfigAsync(DeviceId);
|
||||
// A close-reopen onto another device can complete while this resolve is in flight, so a
|
||||
// superseded open must never install its device's config under the displayed grid.
|
||||
if (generation != _openGeneration || !Visible) { return; }
|
||||
|
||||
if (merged is { } m) { _mergedConfigJson = m.MergedConfigJson; }
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user