FEATURE: increase interval to 24 hours for "please refresh site"

Used to be 2 hours, which is a bit tight, especially for people who leave
computer running overnight.

Keep in mind we always refresh on route change, so clicking on a topic will
trigger a refresh
This commit is contained in:
Sam 2016-09-19 10:12:27 +10:00
parent 24401e71bf
commit fd9056973a

View file

@ -12,13 +12,13 @@ export default {
Discourse.set("assetVersion", version);
if (!timeoutIsSet && Discourse.get("requiresRefresh")) {
// since we can do this transparently for people browsing the forum
// hold back the message a couple of hours
// Since we can do this transparently for people browsing the forum
// hold back the message 24 hours.
setTimeout(function () {
bootbox.confirm(I18n.lookup("assets_changed_confirm"), function (result) {
if (result) { document.location.reload(); }
});
}, 1000 * 60 * 120);
}, 1000 * 60 * 24 * 60);
timeoutIsSet = true;
}