From f2924569049295358a458e4efc1812d475217445 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 19 Jul 2020 22:11:17 +1000 Subject: [PATCH] handle new action keyword in Explorer- one off --- .../UserSettings/PluginSettings.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs index 4c47ca425..4e8831620 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Flow.Launcher.Plugin; namespace Flow.Launcher.Infrastructure.UserSettings @@ -15,6 +15,13 @@ namespace Flow.Launcher.Infrastructure.UserSettings if (Plugins.ContainsKey(metadata.ID)) { var settings = Plugins[metadata.ID]; + + // TODO: Remove. This is one off for 1.2.0 release. + // Introduced a new action keyword in Explorer, so need to update plugin setting in the UserData folder. + // This kind of plugin meta update should be handled by a dedicated method trigger by version bump. + if (metadata.ID == "572be03c74c642baae319fc283e561a8" && metadata.ActionKeywords.Count != settings.ActionKeywords.Count) + settings.ActionKeywords = metadata.ActionKeywords; + if (settings.ActionKeywords?.Count > 0) { metadata.ActionKeywords = settings.ActionKeywords;