mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
refactor: update Repository.HistoriesFilterMode
in Repository.RefreshHistoriesFilters
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
839dab494b
commit
efac161b12
1 changed files with 6 additions and 8 deletions
|
@ -704,12 +704,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var changed = _settings.UpdateHistoriesFilter(tag.Name, Models.FilterType.Tag, mode);
|
||||
if (changed)
|
||||
{
|
||||
if (mode != Models.FilterMode.None || _settings.HistoriesFilters.Count == 0)
|
||||
HistoriesFilterMode = mode;
|
||||
|
||||
RefreshHistoriesFilters();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetBranchFilterMode(BranchTreeNode node, Models.FilterMode mode)
|
||||
|
@ -754,9 +749,6 @@ namespace SourceGit.ViewModels
|
|||
cur = parent;
|
||||
} while (true);
|
||||
|
||||
if (mode != Models.FilterMode.None || _settings.HistoriesFilters.Count == 0)
|
||||
HistoriesFilterMode = mode;
|
||||
|
||||
RefreshHistoriesFilters();
|
||||
}
|
||||
|
||||
|
@ -2073,6 +2065,12 @@ namespace SourceGit.ViewModels
|
|||
UpdateBranchTreeFilterMode(LocalBranchTrees, filters);
|
||||
UpdateBranchTreeFilterMode(RemoteBranchTrees, filters);
|
||||
UpdateTagFilterMode(filters);
|
||||
|
||||
if (_settings.HistoriesFilters.Count > 0)
|
||||
HistoriesFilterMode = _settings.HistoriesFilters[0].Mode;
|
||||
else
|
||||
HistoriesFilterMode = Models.FilterMode.None;
|
||||
|
||||
Task.Run(RefreshCommits);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue