From: David ‘Bombe’ Roden Date: Mon, 15 Nov 2010 08:08:27 +0000 (+0100) Subject: Only get new notifications every 30 seconds in case of an error. X-Git-Tag: 0.3-RC1~42 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=91f551dc6a31642660bb5a387f6d812d26329b2a;p=Sone.git Only get new notifications every 30 seconds in case of an error. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index a9a8c8f..e4992be 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -473,8 +473,10 @@ function getNotifications() { $.each(data.removedNotifications, function(index, value) { $("#sone #notification-area .notification#" + value.id).slideUp(); }); + setTimeout(getNotifications, 5000); + } else { + setTimeout(getNotifications, 30000); } - setTimeout(getNotifications, 5000); }); }