From: David ‘Bombe’ Roden Date: Fri, 11 Nov 2011 10:28:35 +0000 (+0100) Subject: Only mark items as known if the notification is still enabled when it disappears. X-Git-Tag: 0.7.3^2~14^2 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=8f1c9d1ff4724502b3c93545a6a1f0cd9e5e30e2 Only mark items as known if the notification is still enabled when it disappears. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index bbd039c..b819333 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1193,17 +1193,17 @@ function getStatus() { } }); if (!foundNotification) { - if (notificationId == "new-sone-notification") { + if (notificationId == "new-sone-notification" && (data.options["ShowNotification/NewSones"] == true)) { $(".new-sone-id", this).each(function(index, element) { soneId = $(this).text(); markSoneAsKnown(getSone(soneId), true); }); - } else if (notificationId == "new-post-notification") { + } else if (notificationId == "new-post-notification" && (data.options["ShowNotification/NewPosts"] == true)) { $(".post-id", this).each(function(index, element) { postId = $(this).text(); markPostAsKnown(getPost(postId), true); }); - } else if (notificationId == "new-reply-notification") { + } else if (notificationId == "new-reply-notification" && (data.options["ShowNotification/NewReplies"] == true)) { $(".reply-id", this).each(function(index, element) { replyId = $(this).text(); markReplyAsKnown(getReply(replyId), true);