mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
recent_topics: Update unread count of topics inplace.
This commit is contained in:
@@ -152,6 +152,11 @@ exports.update_topic_is_muted = function (stream_id, topic, is_muted) {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.update_topic_unread_count = function (message) {
|
||||||
|
const topic_key = message.stream_id + ":" + message.topic;
|
||||||
|
exports.inplace_rerender(topic_key);
|
||||||
|
};
|
||||||
|
|
||||||
exports.complete_rerender = function () {
|
exports.complete_rerender = function () {
|
||||||
// NOTE: This function is grows expensive with
|
// NOTE: This function is grows expensive with
|
||||||
// number of topics. Only call when necessary.
|
// number of topics. Only call when necessary.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ function process_newly_read_message(message, options) {
|
|||||||
message_list.narrowed.show_message_as_read(message, options);
|
message_list.narrowed.show_message_as_read(message, options);
|
||||||
}
|
}
|
||||||
notifications.close_notification(message);
|
notifications.close_notification(message);
|
||||||
|
recent_topics.update_topic_unread_count(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.process_read_messages_event = function (message_ids) {
|
exports.process_read_messages_event = function (message_ids) {
|
||||||
|
|||||||
Reference in New Issue
Block a user