mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-07 09:15:50 +02:00
Reset script cache when holding Shift during browser reload
This commit is contained in:
parent
7a976edc82
commit
fa4beea425
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user