mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: change the way to refresh repository's data.
* mark dirty instead of calling refresh method directly * force mark branches data dirty after remotes changed
This commit is contained in:
parent
3eb8a82005
commit
a89760c7a5
6 changed files with 33 additions and 17 deletions
|
@ -246,7 +246,7 @@ namespace SourceGit.ViewModels {
|
|||
await Task.Run(() => new Commands.Add(_repo.FullPath, step).Exec());
|
||||
}
|
||||
}
|
||||
_repo.RefreshWorkingCopyChanges();
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
IsStaging = false;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ namespace SourceGit.ViewModels {
|
|||
await Task.Run(() => new Commands.Reset(_repo.FullPath, step).Exec());
|
||||
}
|
||||
}
|
||||
_repo.RefreshWorkingCopyChanges();
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
IsUnstaging = false;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ namespace SourceGit.ViewModels {
|
|||
if (succ) {
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, [ctx.Change]).Exec());
|
||||
}
|
||||
_repo.RefreshWorkingCopyChanges();
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ namespace SourceGit.ViewModels {
|
|||
if (succ) {
|
||||
await Task.Run(() => new Commands.Add(_repo.FullPath, [ctx.Change]).Exec());
|
||||
}
|
||||
_repo.RefreshWorkingCopyChanges();
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ namespace SourceGit.ViewModels {
|
|||
PopupHost.ShowAndStartPopup(new Push(_repo, null));
|
||||
}
|
||||
}
|
||||
_repo.RefreshWorkingCopyChanges();
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
IsCommitting = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue