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