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:
Steve Howell 2013-08-23 14:28:43 -04:00
parent 2b1a99f985
commit 579444eee2
3 changed files with 7 additions and 3 deletions

View File

@ -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());

View File

@ -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) {

View File

@ -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);
}