Commit 1e56f971 authored by wutao's avatar wutao Committed by Commit Bot

assistant: Not show suggestions for launcher query

If embedded Assistant Ui is opened from kLauncherSearchResult, do not
show the conversation starter suggestion chips.

Bug: b/132442518
Test: manual
Change-Id: I871485afaca0d140dc87b029ddab6b99a9312a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610500Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660067}
parent 2c3ab452
...@@ -192,8 +192,10 @@ void SuggestionContainerView::OnUiVisibilityChanged( ...@@ -192,8 +192,10 @@ void SuggestionContainerView::OnUiVisibilityChanged(
AssistantVisibility old_visibility, AssistantVisibility old_visibility,
base::Optional<AssistantEntryPoint> entry_point, base::Optional<AssistantEntryPoint> entry_point,
base::Optional<AssistantExitPoint> exit_point) { base::Optional<AssistantExitPoint> exit_point) {
if (assistant::util::IsStartingSession(new_visibility, old_visibility)) { if (assistant::util::IsStartingSession(new_visibility, old_visibility) &&
// Show conversation starters at the start of a new Assistant session. entry_point.value() != AssistantEntryPoint::kLauncherSearchResult) {
// Show conversation starters at the start of a new Assistant session except
// when the user already started a query in Launcher quick search box (QSB).
OnConversationStartersChanged( OnConversationStartersChanged(
delegate_->GetCacheModel()->GetConversationStarters()); delegate_->GetCacheModel()->GetConversationStarters());
return; return;
......
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