mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: refresh working copy changes immediately after discard finished
This commit is contained in:
parent
51a68027c8
commit
738189393e
1 changed files with 6 additions and 7 deletions
|
@ -54,19 +54,18 @@ namespace SourceGit.ViewModels
|
||||||
return Task.Run(() =>
|
return Task.Run(() =>
|
||||||
{
|
{
|
||||||
if (_changes == null)
|
if (_changes == null)
|
||||||
{
|
|
||||||
Commands.Discard.All(_repo.FullPath);
|
Commands.Discard.All(_repo.FullPath);
|
||||||
}
|
|
||||||
else if (_isUnstaged)
|
else if (_isUnstaged)
|
||||||
{
|
|
||||||
Commands.Discard.ChangesInWorkTree(_repo.FullPath, _changes);
|
Commands.Discard.ChangesInWorkTree(_repo.FullPath, _changes);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Commands.Discard.ChangesInStaged(_repo.FullPath, _changes);
|
Commands.Discard.ChangesInStaged(_repo.FullPath, _changes);
|
||||||
}
|
|
||||||
|
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() =>
|
||||||
|
{
|
||||||
|
_repo.MarkWorkingCopyDirtyManually();
|
||||||
|
_repo.SetWatcherEnabled(true);
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue