fix(settings): hold Change and Move while a switched move awaits Resume

A move that switched to the folder in use but left part of its old folder
showed Resume and a "resume it first" tooltip on Change… and Move…, yet both
stayed enabled because no journal lies in the folder in use. Choosing another
folder then would hide the Resume for good and leave the old folder's copy
on disk. Change… and Move… now wait whenever a stopped move is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 17:43:40 +01:00
1 parent 2654683a12
commit e0644e5304
2 files changed
+23 -2

No files matched your search

@@ -722,6 +722,21 @@ public sealed class SettingsLogicTests
Assert.True(rows.MoveCommand.CanExecute(null));
}
[Test]
public async Task AMoveThatSwitchedHereAndLeftPartOfItsOldFolderStillHoldsChangeAndMove()
{
// The folder in use holds no journal (the move switched to it), but the old folder still does: Resume clears it,
// and another folder chosen first would leave that part with no Resume.
var (_, rows, _) = WorkspaceRows(new FakeWorkspace(), move: () => Task.CompletedTask, isMoving: () => false, unfinished: () => true,
resume: () => Task.CompletedTask);
await rows.MeasureAsync();
Assert.True(rows.CanResumeMove);
Assert.Equal((Loc.L("Tooltips.Settings.Workspace.MoveUnfinished"), Loc.L("Tooltips.Settings.Workspace.MoveUnfinished")), (rows.ChangeToolTip, rows.MoveToolTip));
Assert.False(rows.ChangeCommand.CanExecute(null));
Assert.False(rows.MoveCommand.CanExecute(null));
}
[Test]
public void ADefaultMediaOrOpenPolicySetElsewhereReadsAsEverythingAppliesIt()
{