fix(ui): early-return in ResetAsync when ConfirmAsync is unwired
This commit is contained in:
@@ -427,12 +427,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
private async System.Threading.Tasks.Task ResetAsync()
|
||||
{
|
||||
if (Task == null) return;
|
||||
if (ConfirmAsync != null)
|
||||
{
|
||||
var branchName = $"claudedo/{Task.Id.Replace("-", "")}";
|
||||
var ok = await ConfirmAsync($"Discard worktree and reset task?\nThis deletes branch {branchName} and all uncommitted changes.");
|
||||
if (!ok) return;
|
||||
}
|
||||
if (ConfirmAsync == null) return;
|
||||
|
||||
var branchName = $"claudedo/{Task.Id.Replace("-", "")}";
|
||||
var ok = await ConfirmAsync($"Discard worktree and reset task?\nThis deletes branch {branchName} and all uncommitted changes.");
|
||||
if (!ok) return;
|
||||
|
||||
await _worker.ResetTaskAsync(Task.Id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user