mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: move codes from Views.FilterModeSwitchButton to ViewModels.Repository
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
66842b1d0d
commit
a5606e80d4
7 changed files with 185 additions and 231 deletions
|
@ -125,14 +125,8 @@ namespace SourceGit.ViewModels
|
|||
|
||||
CallUIThread(() =>
|
||||
{
|
||||
if (CheckoutAfterCreated)
|
||||
{
|
||||
_repo.UpdateHistoriesFilterAfterCheckout(new Models.Branch()
|
||||
{
|
||||
FullName = $"refs/heads/{_name}",
|
||||
Upstream = BasedOn is Models.Branch { IsLocal: false } remoteBranch ? remoteBranch.FullName : string.Empty,
|
||||
});
|
||||
}
|
||||
if (CheckoutAfterCreated && _repo.HistoriesFilterMode == Models.FilterMode.Included)
|
||||
_repo.Settings.UpdateHistoriesFilter($"refs/heads/{_name}", Models.FilterType.LocalBranch, Models.FilterMode.Included);
|
||||
|
||||
_repo.MarkBranchesDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue