mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
buddy list: Simplify argument to get_data_from_keys.
This commit is contained in:
@@ -35,8 +35,7 @@ class BuddyListConf {
|
||||
return Number.parseInt(opts.$li.expectOne().attr("data-user-id"), 10);
|
||||
}
|
||||
|
||||
get_data_from_keys(opts) {
|
||||
const keys = opts.keys;
|
||||
get_data_from_keys(keys) {
|
||||
const data = buddy_data.get_items_for_users(keys);
|
||||
return data;
|
||||
}
|
||||
@@ -80,9 +79,7 @@ export class BuddyList extends BuddyListConf {
|
||||
return;
|
||||
}
|
||||
|
||||
const items = this.get_data_from_keys({
|
||||
keys: more_keys,
|
||||
});
|
||||
const items = this.get_data_from_keys(more_keys);
|
||||
|
||||
const html = this.items_to_html({
|
||||
items,
|
||||
|
@@ -57,8 +57,7 @@ run_test("basics", ({override}) => {
|
||||
const buddy_list = new BuddyList();
|
||||
init_simulated_scrolling();
|
||||
|
||||
override(buddy_list, "get_data_from_keys", (opts) => {
|
||||
const keys = opts.keys;
|
||||
override(buddy_list, "get_data_from_keys", (keys) => {
|
||||
assert.deepEqual(keys, [alice.user_id]);
|
||||
return "data-stub";
|
||||
});
|
||||
|
Reference in New Issue
Block a user