Commit ee07c7f9 authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

app_list: enable SuggestionsContainerView::DoUpdate for STATE_APPS state

changes:
SuggestionsContainerView is moved from StartPageView nested class in
go/croscl/548972 to support being added to STATE_APPS state. We should
enable DoUpdate() method for STATE_APPS state.

Bug: 742426
TEST: test that bug is fixed
Change-Id: I5eeabcb52f77ad6ddf34fa1ea75a7f9fc1f162d3
Reviewed-on: https://chromium-review.googlesource.com/571020Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487154}
parent dc499db7
......@@ -52,9 +52,12 @@ TileItemView* SuggestionsContainerView::GetTileItemView(int index) {
}
int SuggestionsContainerView::DoUpdate() {
// Ignore updates and disable buttons when transitioning to a different
// state.
if (contents_view_->GetActiveState() != AppListModel::STATE_START) {
// Ignore updates and disable buttons when suggestions container view is not
// shown. For bubble launcher, that is not on STATE_START state; for
// fullscreen launcher, that is not on STATE_START and STATE_APPS state.
const AppListModel::State state = contents_view_->GetActiveState();
if (state != AppListModel::STATE_START &&
(!is_fullscreen_app_list_enabled_ || state != AppListModel::STATE_APPS)) {
for (auto* view : search_result_tile_views_)
view->SetEnabled(false);
......
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