mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Change some configuration and refactor code
This commit is contained in:
parent
710a1d7fe9
commit
9cd3f90ec4
1 changed files with 4 additions and 4 deletions
|
|
@ -48,8 +48,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
private static readonly RecyclableMemoryStreamManager BufferManager = new();
|
||||
|
||||
private string SettingConfigurationPath => Path.Combine(context.CurrentPluginMetadata.PluginDirectory, "SettingConfiguration.yaml");
|
||||
private string SettingPath => Path.Combine(DataLocation.PluginSettingsDirectory, context.CurrentPluginMetadata.Name, "Setting.json");
|
||||
private string SettingConfigurationPath => Path.Combine(context.CurrentPluginMetadata.PluginDirectory, "SettingsTemplate.yaml");
|
||||
private string SettingPath => Path.Combine(DataLocation.PluginSettingsDirectory, context.CurrentPluginMetadata.Name, "Settings.json");
|
||||
|
||||
public List<Result> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
|
|
@ -417,9 +417,9 @@ namespace Flow.Launcher.Core.Plugin
|
|||
IsChecked = Settings[attribute.Name] is bool isChecked ? isChecked : bool.Parse(attribute.DefaultValue),
|
||||
Margin = settingControlMargin
|
||||
};
|
||||
checkBox.Click += (_, _) =>
|
||||
checkBox.Click += (sender, _) =>
|
||||
{
|
||||
Settings[attribute.Name] = !((bool)Settings[attribute.Name]);
|
||||
Settings[attribute.Name] = ((CheckBox) sender).IsChecked;
|
||||
};
|
||||
contentControl = checkBox;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue