Fix ui.set_count not finding streams that require url encoding in sidebar

(imported from commit c363669806f56650c6aecb66f7208ea692bfd613)
This commit is contained in:
Leo Franchi 2013-03-28 11:04:13 -04:00
parent 1b6d86ef88
commit 0a419e51d0
1 changed files with 3 additions and 2 deletions

View File

@ -1011,11 +1011,12 @@ exports.get_count = function (type, name) {
};
exports.set_count = function (type, name, count) {
var count_span = exports.get_filter_li(type, name).find('.count');
var encoded = encodeURIComponent(name);
var count_span = exports.get_filter_li(type, encoded).find('.count');
var value_span = count_span.find('.value');
if (count === 0) {
return exports.clear_count(type, name);
return exports.clear_count(type, encoded);
}
count_span.show();