Moved settings load and shortcuts init around.
This commit is contained in:
parent
20cef8fc34
commit
efca30743a
|
|
@ -5,6 +5,9 @@
|
|||
function Shortcuts() {}
|
||||
|
||||
Shortcuts.init = function(target) {
|
||||
// Do not initialize twice
|
||||
if (this.overlay) return;
|
||||
|
||||
var that = this;
|
||||
target.addEventListener('keydown', function(e) { that.handleKey(e); });
|
||||
|
||||
|
|
|
|||
|
|
@ -978,13 +978,10 @@ function on_ws_recv(evt) {
|
|||
Utils.setVesselUrl(config['vessel_url']);
|
||||
}
|
||||
|
||||
// Load user interface settings
|
||||
// Load user interface settings from local storage
|
||||
UI.loadSettings();
|
||||
Chat.loadSettings();
|
||||
|
||||
// Initialize keyboard shortcuts
|
||||
Shortcuts.init(document.body);
|
||||
|
||||
break;
|
||||
case "secondary_config":
|
||||
var s = json['value'];
|
||||
|
|
@ -1217,6 +1214,9 @@ function onAudioStart(apiType){
|
|||
|
||||
// Load audio settings from local storage
|
||||
UI.loadAudioSettings();
|
||||
|
||||
// Initialize keyboard shortcuts
|
||||
Shortcuts.init(document.body);
|
||||
}
|
||||
|
||||
var reconnect_timeout = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue