mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
enhance: shows current histories filters and add a button to clear all histories filters (#184)
This commit is contained in:
parent
09d88455c0
commit
99afc74871
6 changed files with 73 additions and 2 deletions
|
@ -404,6 +404,18 @@ namespace SourceGit.ViewModels
|
|||
PopupHost.ShowPopup(new RepositoryConfigure(this));
|
||||
}
|
||||
|
||||
public void ClearHistoriesFilter()
|
||||
{
|
||||
Filters.Clear();
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
RefreshBranches();
|
||||
RefreshTags();
|
||||
RefreshCommits();
|
||||
});
|
||||
}
|
||||
|
||||
public void ClearSearchCommitFilter()
|
||||
{
|
||||
SearchCommitFilter = string.Empty;
|
||||
|
@ -602,9 +614,19 @@ namespace SourceGit.ViewModels
|
|||
validFilters.Add(filter);
|
||||
}
|
||||
}
|
||||
|
||||
if (validFilters.Count > 0)
|
||||
{
|
||||
limits += string.Join(" ", validFilters);
|
||||
|
||||
if (Filters.Count != validFilters.Count)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
Filters.Clear();
|
||||
Filters.AddRange(validFilters);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue