fix(m9/T24b): try/finally around _busy in move dialog (circuit-teardown lock)
This commit is contained in:
+15
-9
@@ -88,18 +88,24 @@
|
||||
|
||||
_busy = true;
|
||||
_error = null;
|
||||
var result = await MoveService.MoveAsync(ConnectionId, target);
|
||||
_busy = false;
|
||||
try
|
||||
{
|
||||
var result = await MoveService.MoveAsync(ConnectionId, target);
|
||||
|
||||
if (result.Success)
|
||||
{
|
||||
await IsVisibleChanged.InvokeAsync(false);
|
||||
await OnMoved.InvokeAsync();
|
||||
if (result.Success)
|
||||
{
|
||||
await IsVisibleChanged.InvokeAsync(false);
|
||||
await OnMoved.InvokeAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Surface the server guard error inline; keep the dialog open.
|
||||
_error = result.Error ?? "Move failed.";
|
||||
}
|
||||
}
|
||||
else
|
||||
finally
|
||||
{
|
||||
// Surface the server guard error inline; keep the dialog open.
|
||||
_error = result.Error ?? "Move failed.";
|
||||
_busy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user