From e5fbfa24b4fb63b827cc58598a2b422737d190d7 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 29 May 2021 22:00:10 +1000 Subject: [PATCH] replace action keyword when updating --- Flow.Launcher.Core/Plugin/PluginManager.cs | 2 +- .../ViewModels/SettingsViewModel.cs | 5 +---- .../Views/ActionKeywordSetting.xaml.cs | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index e2c009ee3..7fe771253 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -274,7 +274,7 @@ namespace Flow.Launcher.Core.Plugin } /// - /// used to add action keyword for multiple action keyword plugin + /// used to remove action keyword for multiple action keyword plugin /// e.g. web search /// public static void RemoveActionKeyword(string id, string oldActionkeyword) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index ae84f92d4..bc2e6ba09 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -43,10 +43,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels internal void UpdateActionKeyword(ActionKeywordProperty modifiedActionKeyword, string newActionKeyword, string oldActionKeyword) { - if (Settings.SearchActionKeyword == Settings.PathSearchActionKeyword) - PluginManager.AddActionKeyword(Context.CurrentPluginMetadata.ID, newActionKeyword); - else - PluginManager.ReplaceActionKeyword(Context.CurrentPluginMetadata.ID, oldActionKeyword, newActionKeyword); + PluginManager.ReplaceActionKeyword(Context.CurrentPluginMetadata.ID, oldActionKeyword, newActionKeyword); switch (modifiedActionKeyword) { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs index 08f162a69..992777802 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs @@ -34,7 +34,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views this.actionKeywordListView = actionKeywordListView; - // Search and File Content action keyword are not allowed to be disabled, they are the default search keyword. + // Search and File Content action keyword are not allowed to be disabled, they are the default search keywords. if (currentActionKeyword.KeywordProperty == ActionKeywordProperty.SearchActionKeyword || currentActionKeyword.KeywordProperty == ActionKeywordProperty.FileContentSearchActionKeyword) chkActionKeywordEnabled.Visibility = Visibility.Collapsed;