mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
fix<Dashboard>: update filters for commits when branch changed or tag deleted
This commit is contained in:
parent
5f34f968d7
commit
382ea6b89a
2 changed files with 13 additions and 2 deletions
|
@ -390,7 +390,17 @@ namespace SourceGit.Git {
|
|||
|
||||
if (nextUpdateTree > 0 && now >= nextUpdateTree) {
|
||||
nextUpdateTree = 0;
|
||||
Branches(true);
|
||||
|
||||
var branches = Branches(true);
|
||||
var badFilters = new List<string>();
|
||||
foreach (var filter in LogFilters) {
|
||||
if (filter.StartsWith("refs/heads/") || filter.StartsWith("refs/remotes/")) {
|
||||
var idx = branches.FindIndex(b => b.FullName == filter);
|
||||
if (idx < 0) badFilters.Add(filter);
|
||||
}
|
||||
}
|
||||
foreach (var bad in badFilters) LogFilters.Remove(bad);
|
||||
|
||||
OnBranchChanged?.Invoke();
|
||||
OnCommitsChanged?.Invoke();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
@ -101,6 +101,7 @@ namespace SourceGit.Git {
|
|||
}
|
||||
}
|
||||
|
||||
repo.LogFilters.Remove(name);
|
||||
repo.OnCommitsChanged?.Invoke();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue