Don't display empty image preview if thumbnail image is null
This commit is contained in:
parent
c8122aa65b
commit
022e61b2d0
|
@ -87,7 +87,10 @@ public class LinkCardStatusDisplayItem extends StatusDisplayItem{
|
|||
crossfadeDrawable.setBlurhashDrawable(card.blurhashPlaceholder);
|
||||
crossfadeDrawable.setCrossfadeAlpha(item.status.spoilerRevealed ? 0f : 1f);
|
||||
photo.setImageDrawable(crossfadeDrawable);
|
||||
photo.setVisibility(View.VISIBLE);
|
||||
didClear=false;
|
||||
} else {
|
||||
photo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// if there's no image, we don't want to cover the inset borders
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
<org.joinmastodon.android.ui.views.MaxWidthFrameLayout
|
||||
android:id="@+id/inner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:foreground="?android:selectableItemBackground"
|
||||
android:maxWidth="@dimen/layout_max_width">
|
||||
<ImageView
|
||||
android:id="@+id/photo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="#0f0"/>
|
||||
<LinearLayout
|
||||
|
|
Loading…
Reference in New Issue