mirror of https://github.com/zulip/zulip.git
recent_topics: Renaming confusingly named deletion handlers.
This functions were oddly named in a way that didn't make clear their role in handling deleted messages.
This commit is contained in:
parent
5142bdd317
commit
beae13b4d6
|
@ -205,6 +205,6 @@ run_test("process_message_for_senders", () => {
|
|||
// delete message1 and message5 sent by sender1
|
||||
messages.splice(4, 1);
|
||||
messages.splice(0, 1);
|
||||
rs.update_topics_of_message_ids([message1.id, message5.id]);
|
||||
rs.update_topics_of_deleted_message_ids([message1.id, message5.id]);
|
||||
assert.equal(rs.get_topic_recent_senders(stream1, topic1).toString(), "2");
|
||||
});
|
||||
|
|
|
@ -653,7 +653,7 @@ run_test("test_delete_messages", () => {
|
|||
Array.from(all_topics.keys()).toString(),
|
||||
"4:topic-10,1:topic-7,1:topic-6,1:topic-5,1:topic-4,1:topic-3,1:topic-2,1:topic-1",
|
||||
);
|
||||
rt.update_topics_of_message_ids([messages[0].id]);
|
||||
rt.update_topics_of_deleted_message_ids([messages[0].id]);
|
||||
|
||||
all_topics = rt.get();
|
||||
assert.equal(
|
||||
|
@ -672,7 +672,7 @@ run_test("test_delete_messages", () => {
|
|||
},
|
||||
});
|
||||
|
||||
rt.update_topics_of_message_ids([messages[1].id, messages[2].id]);
|
||||
rt.update_topics_of_deleted_message_ids([messages[1].id, messages[2].id]);
|
||||
|
||||
all_topics = rt.get();
|
||||
assert.equal(
|
||||
|
|
|
@ -73,7 +73,7 @@ exports.process_topic_edit = function (old_stream_id, old_topic, new_topic, new_
|
|||
// the messages were moved to another stream or deleted.
|
||||
};
|
||||
|
||||
exports.update_topics_of_message_ids = function (message_ids) {
|
||||
exports.update_topics_of_deleted_message_ids = function (message_ids) {
|
||||
const topics_to_update = new Map();
|
||||
for (const msg_id of message_ids) {
|
||||
// message_store still has data on deleted messages when this runs.
|
||||
|
|
|
@ -234,7 +234,7 @@ exports.topic_in_search_results = function (keyword, stream, topic) {
|
|||
return search_words.every((word) => text.includes(word));
|
||||
};
|
||||
|
||||
exports.update_topics_of_message_ids = function (message_ids) {
|
||||
exports.update_topics_of_deleted_message_ids = function (message_ids) {
|
||||
const topics_to_rerender = new Map();
|
||||
for (const msg_id of message_ids) {
|
||||
const message = message_store.get(msg_id);
|
||||
|
|
|
@ -134,8 +134,8 @@ exports.remove_messages = function (message_ids) {
|
|||
}
|
||||
list.remove_and_rerender(msg_ids_to_rerender);
|
||||
}
|
||||
recent_senders.update_topics_of_message_ids(message_ids);
|
||||
recent_topics.update_topics_of_message_ids(message_ids);
|
||||
recent_senders.update_topics_of_deleted_message_ids(message_ids);
|
||||
recent_topics.update_topics_of_deleted_message_ids(message_ids);
|
||||
};
|
||||
|
||||
exports.show_failed_message_success = function (message_id) {
|
||||
|
|
Loading…
Reference in New Issue