diff --git a/src/Converters/FilterModeConverters.cs b/src/Converters/FilterModeConverters.cs index 402a287d..c486af5e 100644 --- a/src/Converters/FilterModeConverters.cs +++ b/src/Converters/FilterModeConverters.cs @@ -6,7 +6,7 @@ namespace SourceGit.Converters public static class FilterModeConverters { public static readonly FuncValueConverter ToBorderBrush = - new FuncValueConverter(v => + new FuncValueConverter(v => { switch (v) { diff --git a/src/Models/Filter.cs b/src/Models/Filter.cs index 8ffd27c7..af4569fa 100644 --- a/src/Models/Filter.cs +++ b/src/Models/Filter.cs @@ -20,19 +20,19 @@ namespace SourceGit.Models public class Filter : ObservableObject { - public string Pattern + public string Pattern { get => _pattern; set => SetProperty(ref _pattern, value); } - public FilterType Type + public FilterType Type { get; set; } = FilterType.LocalBranch; - public FilterMode Mode + public FilterMode Mode { get => _mode; set => SetProperty(ref _mode, value); diff --git a/src/Models/OpenAI.cs b/src/Models/OpenAI.cs index 0a83d8dc..c5ca7449 100644 --- a/src/Models/OpenAI.cs +++ b/src/Models/OpenAI.cs @@ -159,7 +159,7 @@ namespace SourceGit.Models if (Server.Contains("openai.azure.com/", StringComparison.Ordinal)) client.DefaultRequestHeaders.Add("api-key", ApiKey); else - client.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}"); + client.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}"); } var req = new StringContent(JsonSerializer.Serialize(chat, JsonCodeGen.Default.OpenAIChatRequest), Encoding.UTF8, "application/json"); diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index 844a240e..cb07c295 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -234,7 +234,7 @@ namespace SourceGit.Models { var name = filter.Pattern.Substring(11); var b = $"{name.Substring(0, name.Length - 1)}[{name[^1]}]"; - + if (filter.Mode == FilterMode.Included) includedBranches.Add(b); else if (filter.Mode == FilterMode.Excluded) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index c1eb6007..4922f4cb 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -701,7 +701,7 @@ namespace SourceGit.ViewModels if (local.FullName.StartsWith(filter.Pattern, StringComparison.Ordinal)) return; - hasIncludedBranch |= filter.Mode == Models.FilterMode.Included; + hasIncludedBranch |= filter.Mode == Models.FilterMode.Included; } else if (filter.Type == Models.FilterType.RemoteBranch || filter.Type == Models.FilterType.RemoteBranchFolder) { @@ -2035,7 +2035,7 @@ namespace SourceGit.ViewModels { node.FilterMode = _settings.GetHistoriesFilterMode(node.Path, isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder); UpdateBranchTreeFilterMode(node.Children, isLocal); - } + } } } diff --git a/src/Views/FilterModeSwitchButton.axaml.cs b/src/Views/FilterModeSwitchButton.axaml.cs index 5b1f1b2b..448f455e 100644 --- a/src/Views/FilterModeSwitchButton.axaml.cs +++ b/src/Views/FilterModeSwitchButton.axaml.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Avalonia; using Avalonia.Controls; @@ -89,7 +88,7 @@ namespace SourceGit.Views menu.Items.Add(unset); menu.Items.Add(new MenuItem() { Header = "-" }); - } + } var include = new MenuItem(); include.Icon = App.CreateMenuIcon("Icons.Filter");