From d0e80be79f29508664d232b6081bd71b95248764 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 7 Mar 2024 16:18:51 +0800 Subject: [PATCH] feature: enhance commit search * Supports search commits by author/committer email * Auto focus when search panel is visible --- src/ViewModels/Repository.cs | 4 +++- src/Views/Repository.axaml | 3 ++- src/Views/Repository.axaml.cs | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index c19d0a25..85b5131e 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -292,7 +292,9 @@ namespace SourceGit.ViewModels { || c.Subject.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase) || c.Message.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase) || c.Author.Name.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase) - || c.Committer.Name.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)) { + || c.Committer.Name.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase) + || c.Author.Email.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase) + || c.Committer.Email.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)) { visible.Add(c); } } diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index a39890c9..e5739189 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -346,10 +346,11 @@ - +