mirror of https://github.com/zulip/zulip.git
unread: Rename function name for clarity.
Renamed get_msg_ids_for_person to get_msg_ids_for_user_ids_string.
This commit is contained in:
parent
4bc80c30e7
commit
284c86212c
|
@ -422,9 +422,9 @@ test("private_messages", () => {
|
|||
|
||||
assert.equal(unread.num_unread_for_person(alice.user_id.toString()), 0);
|
||||
assert.equal(unread.num_unread_for_person(bob.user_id.toString()), 0);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(alice.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(alice.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_private(), []);
|
||||
|
||||
const message = {
|
||||
|
@ -443,16 +443,18 @@ test("private_messages", () => {
|
|||
|
||||
assert.equal(unread.num_unread_for_person(""), 0);
|
||||
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(alice.user_id.toString()), [message.id]);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(alice.user_id.toString()), [
|
||||
message.id,
|
||||
]);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_private(), [message.id]);
|
||||
assert.deepEqual(unread.get_all_msg_ids(), [message.id]);
|
||||
|
||||
unread.mark_as_read(message.id);
|
||||
assert.equal(unread.num_unread_for_person(alice.user_id.toString()), 0);
|
||||
assert.equal(unread.num_unread_for_person(""), 0);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(alice.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_person(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(alice.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_user_ids_string(bob.user_id.toString()), []);
|
||||
assert.deepEqual(unread.get_msg_ids_for_private(), []);
|
||||
assert.deepEqual(unread.get_all_msg_ids(), []);
|
||||
const counts = unread.get_counts();
|
||||
|
|
|
@ -247,7 +247,7 @@ export function _possible_unread_message_ids() {
|
|||
if (current_filter_pm_string === undefined) {
|
||||
return [];
|
||||
}
|
||||
return unread.get_msg_ids_for_person(current_filter_pm_string);
|
||||
return unread.get_msg_ids_for_user_ids_string(current_filter_pm_string);
|
||||
}
|
||||
|
||||
if (current_filter.can_bucket_by("is-private")) {
|
||||
|
|
|
@ -207,7 +207,7 @@ class UnreadPMCounter {
|
|||
return util.sorted_ids(ids);
|
||||
}
|
||||
|
||||
get_msg_ids_for_person(user_ids_string) {
|
||||
get_msg_ids_for_user_ids_string(user_ids_string) {
|
||||
if (!user_ids_string) {
|
||||
return [];
|
||||
}
|
||||
|
@ -728,8 +728,8 @@ export function get_msg_ids_for_topic(stream_id, topic_name) {
|
|||
return unread_topic_counter.get_msg_ids_for_topic(stream_id, topic_name);
|
||||
}
|
||||
|
||||
export function get_msg_ids_for_person(user_ids_string) {
|
||||
return unread_pm_counter.get_msg_ids_for_person(user_ids_string);
|
||||
export function get_msg_ids_for_user_ids_string(user_ids_string) {
|
||||
return unread_pm_counter.get_msg_ids_for_user_ids_string(user_ids_string);
|
||||
}
|
||||
|
||||
export function get_msg_ids_for_private() {
|
||||
|
|
Loading…
Reference in New Issue