mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
Move message selection to an event-based system
Messages are now selected on a MessageList, which triggers a message_selected event that other parts of the code can listen for. (imported from commit 1da9e4121425c0ac4461b41b7aea169072e1512b)
This commit is contained in:
@@ -41,7 +41,8 @@ MessageList.prototype = {
|
||||
throw (new Error("Selected message id not in MessageList"));
|
||||
}
|
||||
this._selected_id = id;
|
||||
select_message(rows.get(id, this.table_name), this, opts);
|
||||
opts = $.extend({then_scroll: false}, opts, {id: id, msg_list: this});
|
||||
$(document).trigger($.Event('message_selected.zephyr', opts));
|
||||
},
|
||||
|
||||
selected_message: function MessageList_selected_message() {
|
||||
|
||||
Reference in New Issue
Block a user