Delay reloading the page if an ajax error occurs, show notification

This commit is contained in:
Robin McCorkell 2016-04-20 16:31:04 +01:00
parent 34b753baa0
commit bd9a380d53

View File

@ -752,7 +752,8 @@ var OC={
// sometimes "beforeunload" happens later, so need to defer the reload a bit
setTimeout(function() {
if (!self._userIsNavigatingAway && !self._reloadCalled) {
OC.reload();
OC.Notification.show(t('core', 'Problem loading page, reloading in 5 seconds'));
setTimeout(OC.reload, 5000);
// only call reload once
self._reloadCalled = true;
}