From 414684ce43b78452a544dcb12cef8abd1af9e5ee Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 21 Feb 2025 13:50:44 +0800 Subject: [PATCH] Replace action keyword function with api --- .../Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs index f79176f99..fa53e5f5a 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs @@ -83,7 +83,7 @@ namespace Flow.Launcher.Plugin.WebSearch if (!_context.API.ActionKeywordAssigned(keyword)) { var id = _context.CurrentPluginMetadata.ID; - PluginManager.AddActionKeyword(id, keyword); + _context.API.AddActionKeyword(id, keyword); _searchSources.Add(_searchSource); diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs index 739bc9d6b..5efe46a9d 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs @@ -40,7 +40,7 @@ namespace Flow.Launcher.Plugin.WebSearch if (result == MessageBoxResult.Yes) { var id = _context.CurrentPluginMetadata.ID; - PluginManager.RemoveActionKeyword(id, selected.ActionKeyword); + _context.API.RemoveActionKeyword(id, selected.ActionKeyword); _settings.SearchSources.Remove(selected); } }