[MediaWiki-commits] [Gerrit] No Read more section on main page - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: No Read more section on main page .. No Read more section on main page Plus a cleanup of an unused import. Change-Id: I2254b0015624ff5dc71943ba40c34bf2b6fea109 --- M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 2 files changed, 7 insertions(+), 6 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java index 50eebed..be09ea0 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java @@ -38,8 +38,8 @@ private final CommunicationBridge bridge; private final DisableableDrawerLayout slidingPane; private final TextView headerView; -private ToCInteractionFunnel funnel; -private ActionBarActivity parentActivity; +private final ToCInteractionFunnel funnel; +private final ActionBarActivity parentActivity; /** * Flag to track if the drawer is closing because a link was clicked. @@ -225,9 +225,11 @@ sections.add(s); } } -// add a fake section at the end to represent the read more contents at the bottom: -sections.add(new Section(READ_MORE_SECTION_ID, 0, -parentActivity.getString(R.string.read_more_section), , )); +if (!page.getPageProperties().isMainPage()) { +// add a fake section at the end to represent the read more contents at the bottom: +sections.add(new Section(READ_MORE_SECTION_ID, 0, +parentActivity.getString(R.string.read_more_section), , )); +} } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java index 2ab97a7..0a34360 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java @@ -1,7 +1,6 @@ package org.wikipedia.page.bottomcontent; import android.text.Html; -import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.View; -- To view, visit https://gerrit.wikimedia.org/r/177936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2254b0015624ff5dc71943ba40c34bf2b6fea109 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] No Read more section on main page - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/177936 Change subject: No Read more section on main page .. No Read more section on main page Plus a cleanup of an unused import. Change-Id: I2254b0015624ff5dc71943ba40c34bf2b6fea109 --- M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 2 files changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/36/177936/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java index 50eebed..be09ea0 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java @@ -38,8 +38,8 @@ private final CommunicationBridge bridge; private final DisableableDrawerLayout slidingPane; private final TextView headerView; -private ToCInteractionFunnel funnel; -private ActionBarActivity parentActivity; +private final ToCInteractionFunnel funnel; +private final ActionBarActivity parentActivity; /** * Flag to track if the drawer is closing because a link was clicked. @@ -225,9 +225,11 @@ sections.add(s); } } -// add a fake section at the end to represent the read more contents at the bottom: -sections.add(new Section(READ_MORE_SECTION_ID, 0, -parentActivity.getString(R.string.read_more_section), , )); +if (!page.getPageProperties().isMainPage()) { +// add a fake section at the end to represent the read more contents at the bottom: +sections.add(new Section(READ_MORE_SECTION_ID, 0, +parentActivity.getString(R.string.read_more_section), , )); +} } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java index 2ab97a7..0a34360 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java @@ -1,7 +1,6 @@ package org.wikipedia.page.bottomcontent; import android.text.Html; -import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.View; -- To view, visit https://gerrit.wikimedia.org/r/177936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2254b0015624ff5dc71943ba40c34bf2b6fea109 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits