mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: show messages after app load
This commit is contained in:
@@ -114,16 +114,16 @@ app.cacheBuster = null;
|
|||||||
if (app.user.uid > 0) {
|
if (app.user.uid > 0) {
|
||||||
unread.initUnreadTopics();
|
unread.initUnreadTopics();
|
||||||
}
|
}
|
||||||
|
function finishLoad() {
|
||||||
|
$(window).trigger('action:app.load');
|
||||||
|
app.showMessages();
|
||||||
|
appLoaded = true;
|
||||||
|
}
|
||||||
overrides.overrideTimeago();
|
overrides.overrideTimeago();
|
||||||
if (app.user.timeagoCode && app.user.timeagoCode !== 'en') {
|
if (app.user.timeagoCode && app.user.timeagoCode !== 'en') {
|
||||||
require(['timeago/locales/jquery.timeago.' + app.user.timeagoCode], function () {
|
require(['timeago/locales/jquery.timeago.' + app.user.timeagoCode], finishLoad);
|
||||||
$(window).trigger('action:app.load');
|
|
||||||
appLoaded = true;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
$(window).trigger('action:app.load');
|
finishLoad();
|
||||||
appLoaded = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ socket = window.socket;
|
|||||||
|
|
||||||
function onConnect() {
|
function onConnect() {
|
||||||
if (!reconnecting) {
|
if (!reconnecting) {
|
||||||
app.showMessages();
|
|
||||||
$(window).trigger('action:connected');
|
$(window).trigger('action:connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user