fix(raw): a stale open can no longer feed the picker another device's config
This commit is contained in:
@@ -170,6 +170,11 @@
|
||||
}
|
||||
|
||||
var dto = await Svc.LoadTagForEditAsync(TagId);
|
||||
// Two opens can overlap on one modal instance (the tree's Edit command is synchronous and does
|
||||
// not disable while this resolves), so every post-await write is discarded unless this open is
|
||||
// still the displayed one. Last-completion-wins would point the picker at another device.
|
||||
if (_loadedKey != key || !Visible) { return; }
|
||||
|
||||
// RawTagEditDto is a record struct → a missing tag comes back as default (all-zero), not null.
|
||||
if (dto is not { } d || string.IsNullOrEmpty(d.TagId))
|
||||
{
|
||||
@@ -192,6 +197,8 @@
|
||||
try
|
||||
{
|
||||
var merged = await Svc.LoadMergedProbeConfigAsync(d.DeviceId);
|
||||
if (_loadedKey != key || !Visible) { return; } // superseded open → never install its device
|
||||
|
||||
if (merged is { } m)
|
||||
{
|
||||
_mergedConfigJson = m.MergedConfigJson;
|
||||
|
||||
Reference in New Issue
Block a user