From 7bed81dece68ebe356d41b25cb68a2545d96dc0d Mon Sep 17 00:00:00 2001 From: umbrae Date: Fri, 9 Jan 2015 04:00:06 -0800 Subject: [PATCH] Inbox counts: Remove live alter of unread count when mark-on-open is off This is a good interaction in theory, but gets pretty hairy to test for in practice due to modmail being a subset of messages as well as subreddit messages not being restricted to modmail. This issue is blocking release, so remove the buggy feature for rollout to be addressed at a later date. --- r2/r2/public/static/js/reddit.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/r2/r2/public/static/js/reddit.js b/r2/r2/public/static/js/reddit.js index 0a1609503..c0947c523 100644 --- a/r2/r2/public/static/js/reddit.js +++ b/r2/r2/public/static/js/reddit.js @@ -186,20 +186,12 @@ function change_state(elem, op, callback, keep, post_callback) { return false; }; -function alterUnreadCount(num) { - var msgCount = $('.message-count'); - if (msgCount.length > 0) { - msgCount.text(parseInt(msgCount.text(), 10) + num); - } -} - function unread_thing(elem) { var t = $(elem); if (!t.hasClass("thing")) { t = t.thing(); } - alterUnreadCount(1); $(t).addClass("new unread"); } @@ -214,7 +206,6 @@ function read_thing(elem) { $(t).removeClass("unread"); } - alterUnreadCount(-1); $.request("read_message", {"id": $(t).thing_id()}); }