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

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

Issue 2710513002: 📰 Always hide articles header when alone (Closed)
Patch Set: Created 3 years, 10 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/SectionList.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
index 119969041b4e6e6527aebdcf7636db31d2db4f7e..24bc8c0498d26b16b3419ad6a5bfef81ec142fcd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
@@ -17,7 +17,6 @@
import org.chromium.chrome.browser.offlinepages.OfflinePageBridge;
import org.chromium.chrome.browser.suggestions.SuggestionsRanker;
import org.chromium.chrome.browser.suggestions.SuggestionsUiDelegate;
-import org.chromium.chrome.browser.widget.displaystyle.UiConfig;
import java.util.LinkedHashMap;
import java.util.List;
@@ -36,12 +35,9 @@
private final SuggestionsUiDelegate mUiDelegate;
private final OfflinePageBridge mOfflinePageBridge;
private final SuggestionsRanker mSuggestionsRanker;
- private final UiConfig mUiConfig;
- public SectionList(SuggestionsUiDelegate uiDelegate, OfflinePageBridge offlinePageBridge,
- UiConfig uiConfig) {
+ public SectionList(SuggestionsUiDelegate uiDelegate, OfflinePageBridge offlinePageBridge) {
mSuggestionsRanker = new SuggestionsRanker();
- mUiConfig = uiConfig;
mUiDelegate = uiDelegate;
mUiDelegate.getSuggestionsSource().setObserver(this);
mUiDelegate.getMetricsReporter().setRanker(mSuggestionsRanker);
@@ -247,9 +243,6 @@ private void maybeHideArticlesHeader() {
// If there is more than a section we want to show the headers for disambiguation purposes.
if (mSections.size() != 1) return;
- // On larger screens there is no need to hide the header and showing it is more consistent.
- if (!mUiConfig.getCurrentDisplayStyle().isSmall()) return;
-
SuggestionsSection articlesSection = mSections.get(KnownCategories.ARTICLES);
if (articlesSection == null) return;

Powered by Google App Engine
This is Rietveld 408576698