diff --git a/static/js/hotkey.js b/static/js/hotkey.js index b5361ce4e7..bef538db9d 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -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()); diff --git a/static/js/message_list.js b/static/js/message_list.js index 18fa10240d..d0865f5c8b 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -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) { diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index 209064a364..6b402da9ad 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -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); }