mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
@@ -73,7 +73,7 @@ namespace Wox.Core.Plugin
|
||||
metadata = JsonConvert.DeserializeObject<PluginMetadata>(File.ReadAllText(configPath));
|
||||
metadata.PluginDirectory = pluginDirectory;
|
||||
// for plugins which doesn't has ActionKeywords key
|
||||
metadata.ActionKeywords = metadata.ActionKeywords ?? new[] {metadata.ActionKeyword};
|
||||
metadata.ActionKeywords = metadata.ActionKeywords ?? new List<string> {metadata.ActionKeyword};
|
||||
// for plugin still use old ActionKeyword
|
||||
metadata.ActionKeyword = metadata.ActionKeywords?[0];
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace Wox.Core.Plugin
|
||||
|
||||
//replace action keyword if user customized it.
|
||||
var customizedPluginConfig = UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == metadata.ID);
|
||||
if (customizedPluginConfig?.ActionKeywords?.Length > 0)
|
||||
if (customizedPluginConfig?.ActionKeywords?.Count > 0)
|
||||
{
|
||||
metadata.ActionKeywords = customizedPluginConfig.ActionKeywords;
|
||||
metadata.ActionKeyword = customizedPluginConfig.ActionKeywords[0];
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Wox.Core.UserSettings
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string[] ActionKeywords { get; set; }
|
||||
public List<string> ActionKeywords { get; set; }
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user