diff --git a/public/src/app.js b/public/src/app.js index 25dd05a24c..68ec9adf6f 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -114,16 +114,16 @@ app.cacheBuster = null; if (app.user.uid > 0) { unread.initUnreadTopics(); } - + function finishLoad() { + $(window).trigger('action:app.load'); + app.showMessages(); + appLoaded = true; + } overrides.overrideTimeago(); if (app.user.timeagoCode && app.user.timeagoCode !== 'en') { - require(['timeago/locales/jquery.timeago.' + app.user.timeagoCode], function () { - $(window).trigger('action:app.load'); - appLoaded = true; - }); + require(['timeago/locales/jquery.timeago.' + app.user.timeagoCode], finishLoad); } else { - $(window).trigger('action:app.load'); - appLoaded = true; + finishLoad(); } }); }; diff --git a/public/src/sockets.js b/public/src/sockets.js index a5b087222c..4c8e1bc5f3 100644 --- a/public/src/sockets.js +++ b/public/src/sockets.js @@ -101,7 +101,6 @@ socket = window.socket; function onConnect() { if (!reconnecting) { - app.showMessages(); $(window).trigger('action:connected'); }