search: Remove extra filter check before closing search.

Existing callsites to `close_search_bar_and_open_narrow_description`
already do this filter check, so this is extra and unnecessary.
Doing the check always before calling this function probably
makes more sense given the name of the function sounding like
it always takes action.
This commit is contained in:
evykassirer 2023-05-26 20:02:02 -07:00 committed by Tim Abbott
parent cb04ae1f95
commit 3e089c7ac6
1 changed files with 2 additions and 5 deletions

View File

@ -200,9 +200,6 @@ export function close_search_bar_and_open_narrow_description() {
$("#searchbox_form .dropdown-menu").hide();
$("#search_query").val("");
const filter = narrow_state.filter();
if (!filter || filter.is_common_narrow()) {
$(".navbar-search").removeClass("expanded");
$("#message_view_header").removeClass("hidden");
}
$(".navbar-search").removeClass("expanded");
$("#message_view_header").removeClass("hidden");
}