mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-13 09:15:47 +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.Core.Utils;
|
||||||
using TweetDuck.Plugins;
|
using TweetDuck.Plugins;
|
||||||
using TweetDuck.Plugins.Events;
|
using TweetDuck.Plugins.Events;
|
||||||
|
using TweetDuck.Resources;
|
||||||
using TweetDuck.Updates;
|
using TweetDuck.Updates;
|
||||||
|
|
||||||
namespace TweetDuck.Core{
|
namespace TweetDuck.Core{
|
||||||
@ -365,7 +366,11 @@ public void ReinjectCustomCSS(string css){
|
|||||||
|
|
||||||
public void ReloadToTweetDeck(){
|
public void ReloadToTweetDeck(){
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
Resources.ScriptLoader.HotSwap();
|
ScriptLoader.HotSwap();
|
||||||
|
#else
|
||||||
|
if (ModifierKeys.HasFlag(Keys.Shift)){
|
||||||
|
ScriptLoader.ClearCache();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ignoreUpdateCheckError = false;
|
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){
|
private static void ShowLoadError(Control sync, string message){
|
||||||
sync?.InvokeSafe(() => FormMessage.Error("Resource Error", message, FormMessage.OK));
|
sync?.InvokeSafe(() => FormMessage.Error("Resource Error", message, FormMessage.OK));
|
||||||
}
|
}
|
||||||
@ -128,7 +132,7 @@ public static void HotSwap(){
|
|||||||
sw.Stop();
|
sw.Stop();
|
||||||
Debug.WriteLine("Finished rebuild script in "+sw.ElapsedMilliseconds+" ms");
|
Debug.WriteLine("Finished rebuild script in "+sw.ElapsedMilliseconds+" ms");
|
||||||
|
|
||||||
CachedData.Clear();
|
ClearCache();
|
||||||
|
|
||||||
// Force update plugin manager setup scripts
|
// Force update plugin manager setup scripts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user