Go to Home view if user selects an empty search.

(imported from commit 056ba499e16cce686b4ac60dcd282b26f43ab802)
This commit is contained in:
Steve Howell 2013-07-19 15:03:46 -04:00
parent 2a1678a1d3
commit 72f65070f3
2 changed files with 5 additions and 3 deletions

View File

@ -352,6 +352,10 @@ exports.stream = function () {
};
exports.activate = function (operators, opts) {
if (operators.length === 0) {
return exports.deactivate();
}
opts = $.extend({}, {
then_select_id: home_msg_list.selected_id(),
select_first_unread: false,

View File

@ -350,9 +350,7 @@ exports.initialize = function () {
// operators. (The reason the other actions don't call
// this codepath is that they first all blur the box to
// indicate that they've done what they need to do)
if (search_query_box.val().trim()) {
narrow.activate(narrow.parse(search_query_box.val()));
}
narrow.activate(narrow.parse(search_query_box.val()));
search_query_box.blur();
update_buttons_with_focus(false);
}