From 6ca6399bd3d4f6d0501bbf8cf4211b5b1345423b Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 11 Oct 2024 11:29:33 +0800 Subject: [PATCH] enhance: re-run searching after search option changes --- src/ViewModels/Repository.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 8038f333..1a9b9955 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -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(); + } } }