enhance: re-run searching after search option changes

This commit is contained in:
leo 2024-10-11 11:29:33 +08:00
parent b5000f920f
commit 6ca6399bd3
No known key found for this signature in database

View file

@ -213,7 +213,12 @@ namespace SourceGit.ViewModels
public bool OnlySearchCommitsInCurrentBranch
{
get => _onlySearchCommitsInCurrentBranch;
set => SetProperty(ref _onlySearchCommitsInCurrentBranch, value);
set
{
if (SetProperty(ref _onlySearchCommitsInCurrentBranch, value) &&
!string.IsNullOrEmpty(_searchCommitFilter))
StartSearchCommits();
}
}
public int SearchCommitFilterType
@ -222,7 +227,12 @@ namespace SourceGit.ViewModels
set
{
if (SetProperty(ref _searchCommitFilterType, value))
{
UpdateCurrentRevisionFilesForSearchSuggestion();
if (!string.IsNullOrEmpty(_searchCommitFilter))
StartSearchCommits();
}
}
}