From: Andrew Dolgov Date: Thu, 18 Oct 2007 03:00:18 +0000 (+0100) Subject: toggleUnread: properly handle cmode X-Git-Tag: 1.2.16~9 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a70ab7400bd9b51099f5caeb063782f4d7a196ce;p=tt-rss.git toggleUnread: properly handle cmode --- diff --git a/viewfeed.js b/viewfeed.js index 24584e49..be790020 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -653,13 +653,19 @@ function toggleUnread(id, cmode) { nc = nc.replace("Unread", ""); nc = nc.replace("Selected", ""); - if (row.className.match("Unread")) { + if (cmode == undefined || cmode == 2) { + if (row.className.match("Unread")) { + row.className = nc; + } else { + row.className = nc + "Unread"; + } + } else if (cmode == 0) { row.className = nc; - } else { + } else if (cmode == 1) { row.className = nc + "Unread"; } - if (!cmode) cmode = 2; + if (cmode == undefined) cmode = 2; var query = "backend.php?op=rpc&subop=catchupSelected&ids=" + param_escape(id) + "&cmode=" + param_escape(cmode);