Only get new notifications every 30 seconds in case of an error.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 15 Nov 2010 08:08:27 +0000 (09:08 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 15 Nov 2010 08:08:27 +0000 (09:08 +0100)
src/main/resources/static/javascript/sone.js

index a9a8c8f..e4992be 100644 (file)
@@ -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);
        });
 }