From: David ‘Bombe’ Roden Date: Fri, 21 Jan 2011 10:18:32 +0000 (+0100) Subject: Only try to remember the notification’s “opened” status if the new one can also be... X-Git-Tag: 0.4.2^2~10 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=18634e585d0177afbb5c544d4bd2059199110374;p=Sone.git Only try to remember the notification’s “opened” status if the new one can also be opened. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 405c6be..4188326 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -776,7 +776,7 @@ function getStatus() { oldNotification = $("#sone #notification-area .notification#" + value.id); notification = ajaxifyNotification(createNotification(value.id, value.text, value.dismissable)).hide(); if (oldNotification.length != 0) { - if (oldNotification.find(".short-text").length > 0) { + if ((oldNotification.find(".short-text").length > 0) && (notification.find(".short-text").length > 0)) { opened = oldNotification.find(".short-text").hasClass("hidden"); notification.find(".short-text").toggleClass("hidden", opened); notification.find(".text").toggleClass("hidden", !opened);