Skip to content

Commit

Permalink
Fixed weird behaviour if scroll was too fast (description text was me…
Browse files Browse the repository at this point in the history
…ssed)

Signed-off-by: Thomas Gaudin <[email protected]>
  • Loading branch information
nymous committed Dec 6, 2015
1 parent ee3067b commit 4ed3678
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void onBindViewHolder(ViewHolder holder, int position) {
String mPoiDescription = mPoiList.get(position).getDescription();

// We add a Listener, so that a tap on the card opens a WebView to the WP page
if (mPoiSitelink != null) {
if (mPoiSitelink != null && !"".equals(mPoiSitelink)) {
holder.mReadMoreButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand All @@ -124,15 +124,17 @@ public void onClick(View view) {

if (mPoiDescription == null) {
downloadWikipediaExtract(holder, poiName, position);
} else if(!"".equals(mPoiDescription)){
} else if ("".equals(mPoiDescription)) {
holder.mPoiDescription.setVisibility(View.GONE);
} else {
holder.mPoiDescription.setVisibility(View.VISIBLE);
holder.mPoiDescription.setText(mPoiDescription);
}
}

holder.mPoiPicture.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.logo_cut));
// We use Picasso to download the Wikipedia article image
if (mPoiImageUrl != null && !mPoiImageUrl.equals("")) {
if (mPoiImageUrl != null && !"".equals(mPoiImageUrl)) {
displayArticleImage(holder, mPoiImageUrl);
}

Expand Down

1 comment on commit 4ed3678

@nymous
Copy link
Member Author

@nymous nymous commented on 4ed3678 Dec 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem fixed... Issue #58.

Please sign in to comment.