fix: auto-filter does not work well (#855)

This commit is contained in:
leo 2025-01-02 19:49:14 +08:00
parent 127315528a
commit 4e06944c9f
No known key found for this signature in database
5 changed files with 31 additions and 28 deletions

View file

@ -65,13 +65,7 @@ namespace SourceGit.ViewModels
{
var b = _repo.Branches.Find(x => x.IsLocal && x.Name == Branch);
if (b != null && _repo.HistoriesFilterMode == Models.FilterMode.Included)
{
_repo.Settings.HistoriesFilters.Clear();
_repo.Settings.UpdateHistoriesFilter(b.FullName, Models.FilterType.LocalBranch, Models.FilterMode.Included);
if (!string.IsNullOrEmpty(b.Upstream))
_repo.Settings.UpdateHistoriesFilter(b.Upstream, Models.FilterType.LocalBranch, Models.FilterMode.Included);
}
_repo.SetBranchFilterMode(b, Models.FilterMode.Included, true, false);
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);