Reset blinking tab icon when no notifications are visible.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 7 Apr 2011 09:51:57 +0000 (11:51 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 7 Apr 2011 09:51:57 +0000 (11:51 +0200)
src/main/resources/static/javascript/sone.js

index f167d69..1341cc0 100644 (file)
@@ -1030,6 +1030,10 @@ function getStatus() {
                        $.each(data.newReplies, function(index, value) {
                                loadNewReply(value.id, value.sone, value.post, value.postSone);
                        });
+                       /* remove activity when no notifications are visible. */
+                       if ($("#sone #notification-area .notification").length == 0) {
+                               resetActivity();
+                       }
                        /* do it again in 5 seconds. */
                        setTimeout(getStatus, 5000);
                } else {