From 57d5bcf1f8674caa64c5f97baaf12de9bdfc0010 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Mon, 6 May 2013 11:41:43 -0400 Subject: [PATCH] Only update unread counts if you're subscribed to that stream (imported from commit 100047ad6ca1818cdf1c19dfafd0b2e06d95e380) --- zephyr/static/js/zephyr.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 5ecfdd0e1b..bf13938b13 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -293,6 +293,10 @@ function update_unread_counts() { } $.each(unread_counts.stream, function(index, obj) { + if (! subs.have(index)) { + return true; + } + var count = Object.keys(obj).length; ui.set_count("stream", index, count); if (narrow.stream_in_home(index)) {