refactor: move codes from Views.FilterModeSwitchButton to ViewModels.Repository

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-15 10:19:39 +08:00
parent 66842b1d0d
commit a5606e80d4
No known key found for this signature in database
7 changed files with 185 additions and 231 deletions

View file

@ -64,8 +64,8 @@ namespace SourceGit.ViewModels
CallUIThread(() =>
{
var b = _repo.Branches.Find(x => x.IsLocal && x.Name == Branch);
if (b != null)
_repo.UpdateHistoriesFilterAfterCheckout(b);
if (b != null && _repo.HistoriesFilterMode == Models.FilterMode.Included)
_repo.Settings.UpdateHistoriesFilter(b.FullName, Models.FilterType.LocalBranch, Models.FilterMode.Included);
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);