enhance: stop switching workspace when one or more tasks are running in opened pages
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

This commit is contained in:
leo 2024-10-11 17:37:34 +08:00
parent 6ca6399bd3
commit c67cdb931f
No known key found for this signature in database

View file

@ -465,6 +465,15 @@ namespace SourceGit.ViewModels
private void SwitchWorkspace(Workspace to)
{
foreach (var one in Pages)
{
if (one.IsInProgress())
{
App.RaiseException(null, "You have unfinished task(s) in opened pages. Please wait!!!");
return;
}
}
_ignoreIndexChange = true;
var pref = Preference.Instance;