From f4f8e9af5247c2004e6771236784ebe2e5e13b61 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 23 Apr 2025 12:49:36 +0800 Subject: [PATCH] Make settings readonly --- Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | 2 +- Flow.Launcher/CustomShortcutSetting.xaml.cs | 2 +- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs index 3c501d41a..cc07caaa2 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs @@ -10,7 +10,7 @@ namespace Flow.Launcher { public partial class CustomQueryHotkeySetting : Window { - public Settings Settings { get; set; } + public Settings Settings { get; } private bool update; private CustomPluginHotkey updateCustomHotkey; diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs index 183cc3a7f..fcee0c961 100644 --- a/Flow.Launcher/CustomShortcutSetting.xaml.cs +++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs @@ -8,7 +8,7 @@ namespace Flow.Launcher { public partial class CustomShortcutSetting : Window { - public Settings Settings { get; set; } = Ioc.Default.GetRequiredService(); + public Settings Settings { get; } = Ioc.Default.GetRequiredService(); private readonly SettingsPaneHotkeyViewModel _hotkeyVm; public string Key { get; set; } = string.Empty; diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 19edba4d9..f05893cf4 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -5,7 +5,7 @@ namespace Flow.Launcher.ViewModel; public partial class SettingWindowViewModel : BaseModel { - public Settings Settings { get; set; } + public Settings Settings { get; } public SettingWindowViewModel(Settings settings) {