From: David ‘Bombe’ Roden Date: Tue, 25 Jan 2011 05:35:42 +0000 (+0100) Subject: Only match a notifications state if it’s visible. X-Git-Tag: 0.4.2^2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1b939d64e99eb54ef54c27966f01681c11fdcb8d;p=Sone.git Only match a notifications state if it’s visible. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 36db543..6ff4ceb 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -777,7 +777,7 @@ function getStatus() { notification = ajaxifyNotification(createNotification(value.id, value.text, value.dismissable)).hide(); if (oldNotification.length != 0) { if ((oldNotification.find(".short-text").length > 0) && (notification.find(".short-text").length > 0)) { - opened = oldNotification.find(".short-text").hasClass("hidden"); + opened = oldNotification.is(":visible") && oldNotification.find(".short-text").hasClass("hidden"); notification.find(".short-text").toggleClass("hidden", opened); notification.find(".text").toggleClass("hidden", !opened); }