Commit a21c3e1e authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Do not reset searchbox state when closed

Currently state changes are ignored when the app-list is closed,
so I think it's better not to clear the search state there.
Instead this allows to clear the state on showing (ResetForShow).

This works fine with tablet mode so I'm leaving some of the
existing conditions as-is.

Ideally state change should be accepted after the closing animation
finishes -- that wouldn't affect the rendering and animation
smoothness. Modifying that requires larger changes, but this CL
wants to be small for merging to M77 branch.

Bug: 987584
Test: manually
Change-Id: Ie577941b662e68768b2ef03490eb6eb7324332d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725190Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682092}
parent c8862a5d
......@@ -1868,10 +1868,6 @@ void AppListView::OnBoundsAnimationCompleted() {
auto* contents_view = app_list_main_view()->contents_view();
if (contents_view->IsShowingEmbeddedAssistantUI())
contents_view->ShowEmbeddedAssistantUI(false);
// Reset the search box to be shown again. This is done after the animation
// is complete in order to minimize work during the animation.
search_box_view_->ClearSearchAndDeactivateSearchBox();
}
// Layout if the animation was completed.
......
......@@ -119,7 +119,7 @@ void SearchBoxView::ResetForShow() {
if (!is_search_box_active() && is_tablet_mode())
return;
ClearSearch();
ClearSearchAndDeactivateSearchBox();
SetSearchBoxBackgroundCornerRadius(
GetSearchBoxBorderCornerRadiusForState(contents_view_->GetActiveState()));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment