From 483940a98d40af860fac6a945956df62b44934af Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 6 Oct 2019 11:49:47 +1000 Subject: [PATCH] Allow PluginManager class to manage the reload call --- Wox.Core/Plugin/PluginManager.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Wox.Core/Plugin/PluginManager.cs b/Wox.Core/Plugin/PluginManager.cs index 6ca826fd9b..e42cf02e80 100644 --- a/Wox.Core/Plugin/PluginManager.cs +++ b/Wox.Core/Plugin/PluginManager.cs @@ -3,9 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using Wox.Core.Resource; using Wox.Infrastructure; -using Wox.Infrastructure.Exception; using Wox.Infrastructure.Logger; using Wox.Infrastructure.Storage; using Wox.Infrastructure.UserSettings; @@ -66,6 +64,15 @@ namespace Wox.Core.Plugin } } + public static void ReloadData() + { + foreach(var plugin in AllPlugins) + { + var reloadablePlugin = plugin.Plugin as IReloadable; + reloadablePlugin?.ReloadData(); + } + } + static PluginManager() { ValidateUserDirectory();