enhance: refresh working copy changes immediately after discard finished

This commit is contained in:
leo 2024-07-09 15:30:40 +08:00
parent 51a68027c8
commit 738189393e
No known key found for this signature in database

View file

@ -54,19 +54,18 @@ namespace SourceGit.ViewModels
return Task.Run(() =>
{
if (_changes == null)
{
Commands.Discard.All(_repo.FullPath);
}
else if (_isUnstaged)
{
Commands.Discard.ChangesInWorkTree(_repo.FullPath, _changes);
}
else
{
Commands.Discard.ChangesInStaged(_repo.FullPath, _changes);
}
CallUIThread(() => _repo.SetWatcherEnabled(true));
CallUIThread(() =>
{
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
});
return true;
});
}