mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
optimize<*>: App.RaiseException should be called in UIThread; add default progress description for popups;
This commit is contained in:
parent
dc0b33ba21
commit
9c3294c285
35 changed files with 100 additions and 34 deletions
|
@ -30,12 +30,12 @@ namespace SourceGit.ViewModels {
|
|||
|
||||
public override Task<bool> Sure() {
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = _changes == null ? "Discard all local changes ..." : $"Discard total {_changes.Count} changes ...";
|
||||
|
||||
return Task.Run(() => {
|
||||
if (_changes == null) {
|
||||
SetProgressDescription("Discard all local changes ...");
|
||||
Commands.Discard.All(_repo.FullPath);
|
||||
} else {
|
||||
SetProgressDescription($"Discard total {_changes.Count} changes ...");
|
||||
Commands.Discard.Changes(_repo.FullPath, _changes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue