Skip to content

Commit c67cdb9

Browse files
committed
enhance: stop switching workspace when one or more tasks are running in opened pages
1 parent 6ca6399 commit c67cdb9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ViewModels/Launcher.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,15 @@ public ContextMenu CreateContextForPageTab(LauncherPage page)
465465

466466
private void SwitchWorkspace(Workspace to)
467467
{
468+
foreach (var one in Pages)
469+
{
470+
if (one.IsInProgress())
471+
{
472+
App.RaiseException(null, "You have unfinished task(s) in opened pages. Please wait!!!");
473+
return;
474+
}
475+
}
476+
468477
_ignoreIndexChange = true;
469478

470479
var pref = Preference.Instance;

0 commit comments

Comments
 (0)