mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
allowed the "forum updated" message to show up for reloads as well
This commit is contained in:
@@ -54,23 +54,6 @@ var socket,
|
||||
|
||||
socket.emit('meta.reconnected');
|
||||
|
||||
socket.removeAllListeners('event:nodebb.ready');
|
||||
socket.on('event:nodebb.ready', function(cacheBuster) {
|
||||
if (app.cacheBuster !== cacheBuster) {
|
||||
app.cacheBuster = cacheBuster;
|
||||
|
||||
app.alert({
|
||||
alert_id: 'forum_updated',
|
||||
title: '[[global:updated.title]]',
|
||||
message: '[[global:updated.message]]',
|
||||
clickfn: function() {
|
||||
window.location.reload();
|
||||
},
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(window).trigger('action:reconnected');
|
||||
|
||||
setTimeout(function() {
|
||||
@@ -542,6 +525,28 @@ var socket,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
socket.removeAllListeners('event:nodebb.ready');
|
||||
socket.on('event:nodebb.ready', function(cacheBusters) {
|
||||
if (
|
||||
!app.cacheBusters ||
|
||||
app.cacheBusters.general !== cacheBusters.general ||
|
||||
app.cacheBusters.css !== cacheBusters.css ||
|
||||
app.cacheBusters.js !== cacheBusters.js
|
||||
) {
|
||||
app.cacheBusters = cacheBusters;
|
||||
|
||||
app.alert({
|
||||
alert_id: 'forum_updated',
|
||||
title: '[[global:updated.title]]',
|
||||
message: '[[global:updated.message]]',
|
||||
clickfn: function() {
|
||||
window.location.reload();
|
||||
},
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user