Dbrant has uploaded a new change for review.
https://gerrit.wikimedia.org/r/252699
Change subject: Fix bug where description from previous article is used
mistakenly.
......................................................................
Fix bug where description from previous article is used mistakenly.
If we navigate to an article that has a Wikidata description, and then go
to an article that doesn't have a description, the app actually shows the
description from the *previous* article.
This is because, when the description is empty, it never gets applied to
the new ArticleHeaderView.
This patch explicitly passes the description to ArticleHeaderView, whether
it's empty or not.
Change-Id: Icc67b0b6a0a65c8480868ecc3c2e5d8acdd5e3ec
---
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia
refs/changes/99/252699/1
diff --git
a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
index 0c2f85d..46db762 100755
--- a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
@@ -314,10 +314,9 @@
* @param description WikiData description to be shown.
*/
private void layoutWikiDataDescription(@Nullable final String description)
{
+ articleHeaderView.setSubtitle(description);
if (!TextUtils.isEmpty(description)) {
int titleLineCount = articleHeaderView.getLineCount();
-
- articleHeaderView.setSubtitle(description);
// Only show the description if it's two lines or less.
if ((articleHeaderView.getLineCount() - titleLineCount) > 2) {
--
To view, visit https://gerrit.wikimedia.org/r/252699
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc67b0b6a0a65c8480868ecc3c2e5d8acdd5e3ec
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits