Deskana has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/179792

Change subject: Don't display "Read more" section if there are no read more 
suggestions
......................................................................

Don't display "Read more" section if there are no read more suggestions

Bug: T78502
Change-Id: Ifc58333a1df47fc9c4ffd06a19a517c4930e9b32
---
M 
wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/92/179792/1

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 cbef5d0..14022b0 100644
--- 
a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -57,6 +57,7 @@
     private View bottomContentContainer;
     private TextView pageLastUpdatedText;
     private TextView pageLicenseText;
+    private View readMoreContainer;
     private ListView readMoreList;
 
     private SuggestedPagesFunnel funnel;
@@ -80,6 +81,7 @@
 
         pageLastUpdatedText = 
(TextView)bottomContentContainer.findViewById(R.id.page_last_updated_text);
         pageLicenseText = 
(TextView)bottomContentContainer.findViewById(R.id.page_license_text);
+        readMoreContainer = 
bottomContentContainer.findViewById(R.id.read_more_container);
         readMoreList = 
(ListView)bottomContentContainer.findViewById(R.id.read_more_list);
 
         // set up pass-through scroll functionality for the ListView
@@ -263,6 +265,10 @@
                 if (readMoreItems.getResults().size() > 0) {
                     setupReadMoreSection(layoutInflater, readMoreItems);
                 }
+                else {
+                    // If there's no results, just hide the section
+                    readMoreContainer.setVisibility(View.GONE);
+                }
                 layoutContent();
             }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/179792
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc58333a1df47fc9c4ffd06a19a517c4930e9b32
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to