Skip to content

Commit

Permalink
hashchange: Use overlays.close_active() in a few places.
Browse files Browse the repository at this point in the history
The `change_tab_to` calls are a relic of very
early versions of Zulip.
  • Loading branch information
Steve Howell authored and timabbott committed Dec 7, 2018
1 parent 6d22634 commit a39c709
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion static/js/click_handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ exports.initialize = function () {

$(".brand").on('click', function (e) {
if (overlays.is_active()) {
ui_util.change_tab_to('#home');
overlays.close_active();
} else {
narrow.restore_home_state();
}
Expand Down
4 changes: 2 additions & 2 deletions static/js/stream_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function keydown_enter_key() {
}

if (overlays.is_active()) {
ui_util.change_tab_to('#home');
overlays.close_active();
}
exports.clear_and_hide_search();
narrow.by('stream', sub.name, {trigger: 'sidebar enter key'});
Expand Down Expand Up @@ -485,7 +485,7 @@ exports.initialize = function () {
return;
}
if (overlays.is_active()) {
ui_util.change_tab_to('#home');
overlays.close_active();
}
var stream_id = $(e.target).parents('li').attr('data-stream-id');
var sub = stream_data.get_sub_by_id(stream_id);
Expand Down
2 changes: 1 addition & 1 deletion static/js/topic_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ exports.initialize = function () {
// In a more componentized world, we would delegate some
// of this stuff back up to our parents.
if (overlays.is_active()) {
ui_util.change_tab_to('#home');
overlays.close_active();
}

var stream_id = $(e.target).parents('.narrow-filter').attr('data-stream-id');
Expand Down

0 comments on commit a39c709

Please sign in to comment.