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