mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Rename subject_count -> topic_count.
This fixes all names in the JS codebase.
This commit is contained in:
@@ -64,7 +64,7 @@ exports.unread_topic_counter = (function () {
|
||||
var res = {};
|
||||
res.stream_unread_messages = 0;
|
||||
res.stream_count = num_dict(); // hash by stream_id -> count
|
||||
res.subject_count = num_dict(); // hash of hashes (stream_id, then subject -> count)
|
||||
res.topic_count = num_dict(); // hash of hashes (stream_id, then topic -> count)
|
||||
unread_topics.each(function (_, stream_id) {
|
||||
|
||||
// We track unread counts for streams that may be currently
|
||||
@@ -77,11 +77,11 @@ exports.unread_topic_counter = (function () {
|
||||
}
|
||||
|
||||
if (unread_topics.has(stream_id)) {
|
||||
res.subject_count.set(stream_id, str_dict());
|
||||
res.topic_count.set(stream_id, str_dict());
|
||||
var stream_count = 0;
|
||||
unread_topics.get(stream_id).each(function (msgs, topic) {
|
||||
var topic_count = msgs.num_items();
|
||||
res.subject_count.get(stream_id).set(topic, topic_count);
|
||||
res.topic_count.get(stream_id).set(topic, topic_count);
|
||||
if (!muting.is_topic_muted(sub.name, topic)) {
|
||||
stream_count += topic_count;
|
||||
}
|
||||
@@ -242,11 +242,11 @@ exports.get_counts = function () {
|
||||
res.mentioned_message_count = unread_mentioned.num_items();
|
||||
res.pm_count = new Dict(); // Hash by user_ids_string -> count
|
||||
|
||||
// This sets stream_count, subject_count, and home_unread_messages
|
||||
// This sets stream_count, topic_count, and home_unread_messages
|
||||
var topic_res = exports.unread_topic_counter.get_counts(res);
|
||||
res.home_unread_messages = topic_res.stream_unread_messages;
|
||||
res.stream_count = topic_res.stream_count;
|
||||
res.subject_count = topic_res.subject_count;
|
||||
res.topic_count = topic_res.topic_count;
|
||||
|
||||
var pm_count = 0;
|
||||
unread_privates.each(function (obj, user_ids_string) {
|
||||
|
||||
Reference in New Issue
Block a user