Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
buddy_list: Rename other_key to new_key in buddy_list.insert_new_html.
YashRE42900a7762932e
diff --git a/static/js/buddy_list.js b/static/js/buddy_list.jsindex 067065f850a..e0e64df101d 100644--- a/static/js/buddy_list.js+++ b/static/js/buddy_list.js@@ -216,11 +216,11 @@ export class BuddyList extends BuddyListConf {}insert_new_html(opts) {- const other_key = opts.other_key;+ const new_key = opts.new_key;const html = opts.html;const pos = opts.pos;- if (other_key === undefined) {+ if (new_key === undefined) {if (pos === this.render_count) {this.render_count += 1;this.$container.append(html);@@ -231,7 +231,7 @@ export class BuddyList extends BuddyListConf {if (pos < this.render_count) {this.render_count += 1;- const $li = this.find_li({key: other_key});+ const $li = this.find_li({key: new_key});$li.before(html);this.update_padding();}@@ -247,10 +247,10 @@ export class BuddyList extends BuddyListConf {key,});- // Order is important here--get the other_key+ // Order is important here--get the new_key// before mutating our list. An undefined value// corresponds to appending.- const other_key = this.keys[pos];+ const new_key = this.keys[pos];this.keys.splice(pos, 0, key);@@ -258,7 +258,7 @@ export class BuddyList extends BuddyListConf {this.insert_new_html({pos,html,- other_key,+ new_key,});}