Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

left sidebar: Rename convos => conversations variable names.

Tim Abbott64cdb9a919be
diff --git a/frontend_tests/node_tests/pm_list_data.js b/frontend_tests/node_tests/pm_list_data.js
index 7b8b5c93dd0..b424c2ac466 100644
--- a/frontend_tests/node_tests/pm_list_data.js
+++ b/frontend_tests/node_tests/pm_list_data.js
@@ -55,7 +55,7 @@ function test(label, f) {
});
}
-test("get_convos", ({override}) => {
+test("get_conversations", ({override}) => {
pm_conversations.recent.insert([alice.user_id, bob.user_id], 1);
pm_conversations.recent.insert([me.user_id], 2);
let num_unread_for_person = 1;
@@ -90,23 +90,23 @@ test("get_convos", ({override}) => {
},
];
- let pm_data = pm_list_data.get_convos();
+ let pm_data = pm_list_data.get_conversations();
assert.deepEqual(pm_data, expected_data);
num_unread_for_person = 0;
- pm_data = pm_list_data.get_convos();
+ pm_data = pm_list_data.get_conversations();
expected_data[0].unread = 0;
expected_data[0].is_zero = true;
expected_data[1].unread = 0;
expected_data[1].is_zero = true;
assert.deepEqual(pm_data, expected_data);
- pm_data = pm_list_data.get_convos();
+ pm_data = pm_list_data.get_conversations();
assert.deepEqual(pm_data, expected_data);
});
-test("get_convos bot", ({override}) => {
+test("get_conversations bot", ({override}) => {
pm_conversations.recent.insert([alice.user_id, bob.user_id], 1);
pm_conversations.recent.insert([bot_test.user_id], 2);
@@ -139,7 +139,7 @@ test("get_convos bot", ({override}) => {
},
];
- const pm_data = pm_list_data.get_convos();
+ const pm_data = pm_list_data.get_conversations();
assert.deepEqual(pm_data, expected_data);
});
diff --git a/static/js/pm_list.js b/static/js/pm_list.js
index dcf487d9fb9..038cefce485 100644
--- a/static/js/pm_list.js
+++ b/static/js/pm_list.js
@@ -34,8 +34,8 @@ export function close() {
}
export function _build_private_messages_list() {
- const convos = pm_list_data.get_convos();
- const dom_ast = pm_list_dom.pm_ul(convos);
+ const conversations = pm_list_data.get_conversations();
+ const dom_ast = pm_list_dom.pm_ul(conversations);
return dom_ast;
}
diff --git a/static/js/pm_list_data.js b/static/js/pm_list_data.js
index 464d05f98ff..bb4f0649428 100644
--- a/static/js/pm_list_data.js
+++ b/static/js/pm_list_data.js
@@ -22,7 +22,7 @@ export function get_active_user_ids_string() {
return people.emails_strings_to_user_ids_string(emails);
}
-export function get_convos() {
+export function get_conversations() {
const private_messages = pm_conversations.recent.get();
const display_messages = [];
const active_user_ids_string = get_active_user_ids_string();
diff --git a/static/js/pm_list_dom.js b/static/js/pm_list_dom.js
index 4f985c144ca..e3617237bb2 100644
--- a/static/js/pm_list_dom.js
+++ b/static/js/pm_list_dom.js
@@ -4,28 +4,28 @@ import render_pm_list_item from "../templates/pm_list_item.hbs";
import * as vdom from "./vdom";
-export function keyed_pm_li(convo) {
- const render = () => render_pm_list_item(convo);
+export function keyed_pm_li(conversation) {
+ const render = () => render_pm_list_item(conversation);
- const eq = (other) => _.isEqual(convo, other.convo);
+ const eq = (other) => _.isEqual(conversation, other.conversation);
- const key = convo.user_ids_string;
+ const key = conversation.user_ids_string;
return {
key,
render,
- convo,
+ conversation,
eq,
};
}
-export function pm_ul(convos) {
+export function pm_ul(conversations) {
const attrs = [
["class", "expanded_private_messages"],
["data-name", "private"],
];
return vdom.ul({
attrs,
- keyed_nodes: convos.map((convo) => keyed_pm_li(convo)),
+ keyed_nodes: conversations.map((conversation) => keyed_pm_li(conversation)),
});
}
diff --git a/static/js/topic_list.js b/static/js/topic_list.js
index 0e2575608e4..6108db25998 100644
--- a/static/js/topic_list.js
+++ b/static/js/topic_list.js
@@ -67,17 +67,17 @@ export function zoom_out() {
rebuild(parent_widget, stream_id);
}
-export function keyed_topic_li(convo) {
- const render = () => render_topic_list_item(convo);
+export function keyed_topic_li(conversation) {
+ const render = () => render_topic_list_item(conversation);
- const eq = (other) => _.isEqual(convo, other.convo);
+ const eq = (other) => _.isEqual(conversation, other.conversation);
- const key = "t:" + convo.topic_name;
+ const key = "t:" + conversation.topic_name;
return {
key,
render,
- convo,
+ conversation,
eq,
};
}
@@ -149,7 +149,7 @@ export class TopicListWidget {
const attrs = [["class", "topic-list"]];
- const nodes = list_info.items.map((convo) => keyed_topic_li(convo));
+ const nodes = list_info.items.map((conversation) => keyed_topic_li(conversation));
if (spinner) {
nodes.push(spinner_li());