enhance: disable CONTINUE button while it is running (#1046)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-04 09:29:07 +08:00
parent 35ee4a47db
commit d4bcc60113
No known key found for this signature in database
2 changed files with 14 additions and 1 deletions

View file

@ -440,6 +440,8 @@ namespace SourceGit.ViewModels
public void ContinueMerge()
{
IsCommitting = true;
if (_inProgressContext != null)
{
_repo.SetWatcherEnabled(false);
@ -456,17 +458,21 @@ namespace SourceGit.ViewModels
CommitMessage = string.Empty;
_repo.SetWatcherEnabled(true);
IsCommitting = false;
});
});
}
else
{
_repo.MarkWorkingCopyDirtyManually();
IsCommitting = false;
}
}
public void SkipMerge()
{
IsCommitting = true;
if (_inProgressContext != null)
{
_repo.SetWatcherEnabled(false);
@ -479,17 +485,21 @@ namespace SourceGit.ViewModels
CommitMessage = string.Empty;
_repo.SetWatcherEnabled(true);
IsCommitting = false;
});
});
}
else
{
_repo.MarkWorkingCopyDirtyManually();
IsCommitting = false;
}
}
public void AbortMerge()
{
IsCommitting = true;
if (_inProgressContext != null)
{
_repo.SetWatcherEnabled(false);
@ -502,12 +512,14 @@ namespace SourceGit.ViewModels
CommitMessage = string.Empty;
_repo.SetWatcherEnabled(true);
IsCommitting = false;
});
});
}
else
{
_repo.MarkWorkingCopyDirtyManually();
IsCommitting = false;
}
}