mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 16:51:16 +08:00
FIX: stop stacking, stuff was upgraded dialogs
This commit is contained in:
parent
0d281d9de6
commit
21bc20169e
@ -6,12 +6,13 @@ export default {
|
|||||||
after: "message-bus",
|
after: "message-bus",
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
|
var timeoutIsSet = false;
|
||||||
if (!Discourse.MessageBus) { return; }
|
if (!Discourse.MessageBus) { return; }
|
||||||
|
|
||||||
Discourse.MessageBus.subscribe("/global/asset-version", function (version) {
|
Discourse.MessageBus.subscribe("/global/asset-version", function (version) {
|
||||||
Discourse.set("assetVersion", version);
|
Discourse.set("assetVersion", version);
|
||||||
|
|
||||||
if (Discourse.get("requiresRefresh")) {
|
if (!timeoutIsSet && Discourse.get("requiresRefresh")) {
|
||||||
// since we can do this transparently for people browsing the forum
|
// since we can do this transparently for people browsing the forum
|
||||||
// hold back the message a couple of hours
|
// hold back the message a couple of hours
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@ -19,6 +20,7 @@ export default {
|
|||||||
if (result) { document.location.reload(); }
|
if (result) { document.location.reload(); }
|
||||||
});
|
});
|
||||||
}, 1000 * 60 * 120);
|
}, 1000 * 60 * 120);
|
||||||
|
timeoutIsSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user