fix: show messages after app load

This commit is contained in:
Barış Soner Uşaklı
2020-11-19 20:34:26 -05:00
parent 814771bdc7
commit 46acbfdaf1
2 changed files with 7 additions and 8 deletions

View File

@@ -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();
}
});
};

View File

@@ -101,7 +101,6 @@ socket = window.socket;
function onConnect() {
if (!reconnecting) {
app.showMessages();
$(window).trigger('action:connected');
}