diff --git a/Core/FormBrowser.cs b/Core/FormBrowser.cs index 3aef36b7..7d8e221b 100644 --- a/Core/FormBrowser.cs +++ b/Core/FormBrowser.cs @@ -15,6 +15,7 @@ using TweetDuck.Core.Utils; using TweetDuck.Plugins; using TweetDuck.Plugins.Events; +using TweetDuck.Resources; using TweetDuck.Updates; namespace TweetDuck.Core{ @@ -365,7 +366,11 @@ public void ReinjectCustomCSS(string css){ public void ReloadToTweetDeck(){ #if DEBUG - Resources.ScriptLoader.HotSwap(); + ScriptLoader.HotSwap(); + #else + if (ModifierKeys.HasFlag(Keys.Shift)){ + ScriptLoader.ClearCache(); + } #endif ignoreUpdateCheckError = false; diff --git a/Resources/ScriptLoader.cs b/Resources/ScriptLoader.cs index 42a41959..f5e83c62 100644 --- a/Resources/ScriptLoader.cs +++ b/Resources/ScriptLoader.cs @@ -80,6 +80,10 @@ public static void ExecuteScript(IFrame frame, string script, string identifier) } } + public static void ClearCache(){ + CachedData.Clear(); + } + private static void ShowLoadError(Control sync, string message){ sync?.InvokeSafe(() => FormMessage.Error("Resource Error", message, FormMessage.OK)); } @@ -128,7 +132,7 @@ public static void HotSwap(){ sw.Stop(); Debug.WriteLine("Finished rebuild script in "+sw.ElapsedMilliseconds+" ms"); - CachedData.Clear(); + ClearCache(); // Force update plugin manager setup scripts