From f8a6b02c80559d020437ebc166a18c8e88fd78d9 Mon Sep 17 00:00:00 2001 From: dcog989 Date: Thu, 24 Jul 2025 02:33:59 +0100 Subject: [PATCH] fix for GitHub build server failure Removes external dependency for NumberGroupSeparator so it builds anywhere. --- .../Flow.Launcher.Plugin.Calculator/Main.cs | 8 +++---- .../Views/CalculatorSettings.xaml.cs | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index e9ea2d08c..cc5032c6b 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -245,11 +245,9 @@ namespace Flow.Launcher.Plugin.Calculator private string GetGroupSeparator(string decimalSeparator) { - // Use system culture's group separator when available and it doesn't conflict - var systemGroupSep = CultureInfo.CurrentCulture.NumberFormat.NumberGroupSeparator; - return decimalSeparator == systemGroupSep - ? (decimalSeparator == dot ? comma : dot) - : systemGroupSep; + // This logic is now independent of the system's group separator + // to ensure consistent output for unit testing. + return decimalSeparator == dot ? comma : dot; } private bool CanCalculate(Query query) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs new file mode 100644 index 000000000..64e2adc6e --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs @@ -0,0 +1,23 @@ +using System.Windows.Controls; +using Flow.Launcher.Plugin.Calculator.ViewModels; + +namespace Flow.Launcher.Plugin.Calculator.Views +{ + /// + /// Interaction logic for CalculatorSettings.xaml + /// + public partial class CalculatorSettings : UserControl + { + private readonly SettingsViewModel _viewModel; + private readonly Settings _settings; + + public CalculatorSettings(SettingsViewModel viewModel) + { + _viewModel = viewModel; + _settings = viewModel.Settings; + DataContext = viewModel; + InitializeComponent(); + } + } + +} \ No newline at end of file