mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
Extract topic_data.js.
This new module tracks the recent topic names for any given stream. The code was pulled over almost verbatim from stream_data.js, with minor renames to the function names. We introduced a minor one-line function called stream_has_topics.
This commit is contained in:
@@ -186,7 +186,7 @@ exports.update_messages = function update_messages(events) {
|
||||
|
||||
// Remove the recent topics entry for the old topics;
|
||||
// must be called before we update msg.subject
|
||||
stream_data.process_message_for_recent_topics(msg, true);
|
||||
topic_data.process_message(msg, true);
|
||||
// Update the unread counts; again, this must be called
|
||||
// before we update msg.subject
|
||||
unread.update_unread_topics(msg, event);
|
||||
@@ -196,7 +196,7 @@ exports.update_messages = function update_messages(events) {
|
||||
message_store.set_topic_edit_properties(msg);
|
||||
// Add the recent topics entry for the new topics; must
|
||||
// be called after we update msg.subject
|
||||
stream_data.process_message_for_recent_topics(msg);
|
||||
topic_data.process_message(msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user