Commit 22265039 authored by calamity's avatar calamity Committed by Commit bot

Fix apps sometimes not showing up in the app list search results.

This CL fixes an issue with the experimental app list search where the
app results would sometimes not show up. This was being caused by the
display type not being updated when the result was copied from the
mixer, causing recommendation results not to change into tile results.

BUG=456060

Review URL: https://codereview.chromium.org/909773002

Cr-Commit-Position: refs/heads/master@{#315264}
parent 601e6f32
......@@ -28,6 +28,7 @@ const size_t kMaxSuggestionsResults = 6;
const size_t kNoMaxResultsLimit = 0;
void UpdateResult(const SearchResult& source, SearchResult* target) {
target->set_display_type(source.display_type());
target->set_title(source.title());
target->set_title_tags(source.title_tags());
target->set_details(source.details());
......
......@@ -99,7 +99,11 @@ class APP_LIST_EXPORT SearchResult {
const std::string& id() const { return id_; }
double relevance() const { return relevance_; }
DisplayType display_type() const { return display_type_; }
void set_display_type(DisplayType display_type) {
display_type_ = display_type;
}
const Actions& actions() const {
return actions_;
......@@ -143,9 +147,6 @@ class APP_LIST_EXPORT SearchResult {
protected:
void set_id(const std::string& id) { id_ = id; }
void set_relevance(double relevance) { relevance_ = relevance; }
void set_display_type(DisplayType display_type) {
display_type_ = display_type;
}
void set_voice_result(bool voice_result) { voice_result_ = voice_result; }
private:
......
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