mirror of https://github.com/zulip/zulip.git
Enable "enter" key for muted summary rows.
(The approach has been simplified to look for summary_row in the DOM, which makes muted and summary features work off the same code.) (imported from commit 4fa3d6ae5ad7bbac5958e60ecffb368d6ef29d2e)
This commit is contained in:
parent
2b1a99f985
commit
579444eee2
|
@ -261,7 +261,7 @@ function process_hotkey(e) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (current_msg_list.summary_is_selected()) {
|
||||
if (current_msg_list.on_expandable_row()) {
|
||||
switch (event_name) {
|
||||
case 'enter':
|
||||
ui.expand_summary_row(current_msg_list.selected_row());
|
||||
|
|
|
@ -126,8 +126,8 @@ MessageList.prototype = {
|
|||
return this.get_row(this._selected_id);
|
||||
},
|
||||
|
||||
summary_is_selected: function () {
|
||||
return this.is_summarized_message(this.selected_message());
|
||||
on_expandable_row: function MessageList_on_expandable_row() {
|
||||
return this.view.is_expandable_row(this.selected_row());
|
||||
},
|
||||
|
||||
closest_id: function MessageList_closest_id(id) {
|
||||
|
|
|
@ -621,6 +621,10 @@ MessageListView.prototype = {
|
|||
return this.get_row(this.list.selected_id());
|
||||
},
|
||||
|
||||
is_expandable_row: function MessageListView_is_expandable_row(row) {
|
||||
return row.hasClass('summary_row');
|
||||
},
|
||||
|
||||
get_message: function MessageListView_get_message(id) {
|
||||
return this.list.get(id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue