mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 05:48:11 -05:00
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.
This commit is contained in:
@@ -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()});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user