Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3919)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
index 0129065e42a3b1d7fbffb3298dd9217d6000b7ac..b959b3b946ca1f3750147ec4dd72b27792665e44 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
@@ -24,12 +24,12 @@ public class SuggestionsSection implements ItemGroup {
private final ProgressListItem mProgressIndicator = new ProgressListItem();
private final ActionListItem mMoreButton;
- public SuggestionsSection(List<SnippetArticleListItem> suggestions,
+ public SuggestionsSection(int category, List<SnippetArticleListItem> suggestions,
@CategoryStatusEnum int status, SuggestionsCategoryInfo info,
NewTabPageAdapter adapter) {
mInfo = info;
mHeader = new SnippetHeaderListItem(mInfo.getTitle());
- mMoreButton = null; // TODO(pke): Read from info => ? new ActionListItem() : null;
+ mMoreButton = info.hasMoreButton() ? new ActionListItem(category) : null;
setSuggestions(suggestions, status, adapter);
}

Powered by Google App Engine
This is Rietveld 408576698