mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-05-09 10:54:08 +00:00
Move execution of startup actions after initialisation of the language switcher (#8950)
Fixes #8946
This commit is contained in:
parent
636dae6c58
commit
c3695765ad
@ -67,14 +67,6 @@ exports.startup = function() {
|
|||||||
wiki: $tw.wiki,
|
wiki: $tw.wiki,
|
||||||
document: $tw.browser ? document : $tw.fakeDocument
|
document: $tw.browser ? document : $tw.fakeDocument
|
||||||
});
|
});
|
||||||
// Execute any startup actions
|
|
||||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
|
|
||||||
if($tw.browser) {
|
|
||||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
|
|
||||||
}
|
|
||||||
if($tw.node) {
|
|
||||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
|
|
||||||
}
|
|
||||||
// Kick off the language manager and switcher
|
// Kick off the language manager and switcher
|
||||||
$tw.language = new $tw.Language();
|
$tw.language = new $tw.Language();
|
||||||
$tw.languageSwitcher = new $tw.PluginSwitcher({
|
$tw.languageSwitcher = new $tw.PluginSwitcher({
|
||||||
@ -117,6 +109,14 @@ exports.startup = function() {
|
|||||||
handlerMethod: "handleKeydownEvent"
|
handlerMethod: "handleKeydownEvent"
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
// Execute any startup actions
|
||||||
|
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
|
||||||
|
if($tw.browser) {
|
||||||
|
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
|
||||||
|
}
|
||||||
|
if($tw.node) {
|
||||||
|
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
|
||||||
|
}
|
||||||
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
|
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
|
||||||
$tw.wiki.clearTiddlerEventQueue();
|
$tw.wiki.clearTiddlerEventQueue();
|
||||||
// Find a working syncadaptor
|
// Find a working syncadaptor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user