Skip to content

Commit 9cd3f90

Browse files
committed
Change some configuration and refactor code
1 parent 710a1d7 commit 9cd3f90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ internal abstract class JsonRPCPlugin : IAsyncPlugin, IContextMenu, ISettingProv
4848

4949
private static readonly RecyclableMemoryStreamManager BufferManager = new();
5050

51-
private string SettingConfigurationPath => Path.Combine(context.CurrentPluginMetadata.PluginDirectory, "SettingConfiguration.yaml");
52-
private string SettingPath => Path.Combine(DataLocation.PluginSettingsDirectory, context.CurrentPluginMetadata.Name, "Setting.json");
51+
private string SettingConfigurationPath => Path.Combine(context.CurrentPluginMetadata.PluginDirectory, "SettingsTemplate.yaml");
52+
private string SettingPath => Path.Combine(DataLocation.PluginSettingsDirectory, context.CurrentPluginMetadata.Name, "Settings.json");
5353

5454
public List<Result> LoadContextMenus(Result selectedResult)
5555
{
@@ -417,9 +417,9 @@ public Control CreateSettingPanel()
417417
IsChecked = Settings[attribute.Name] is bool isChecked ? isChecked : bool.Parse(attribute.DefaultValue),
418418
Margin = settingControlMargin
419419
};
420-
checkBox.Click += (_, _) =>
420+
checkBox.Click += (sender, _) =>
421421
{
422-
Settings[attribute.Name] = !((bool)Settings[attribute.Name]);
422+
Settings[attribute.Name] = ((CheckBox) sender).IsChecked;
423423
};
424424
contentControl = checkBox;
425425
break;

0 commit comments

Comments
 (0)