feature: add context menu to switch histories filter mode to selected commit

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-21 20:50:51 +08:00
parent e6e1e4e82e
commit 8bd5bd864e
No known key found for this signature in database
5 changed files with 121 additions and 0 deletions

View file

@ -707,6 +707,13 @@ namespace SourceGit.ViewModels
RefreshHistoriesFilters();
}
public void SetBranchFilterMode(Models.Branch branch, Models.FilterMode mode)
{
var node = FindBranchNode(branch.IsLocal ? _localBranchTrees : _remoteBranchTrees, branch.FullName);
if (node != null)
SetBranchFilterMode(node, mode);
}
public void SetBranchFilterMode(BranchTreeNode node, Models.FilterMode mode)
{
var isLocal = node.Path.StartsWith("refs/heads/", StringComparison.Ordinal);