Skip to content

Commit

Permalink
Merge pull request #292 from FineFindus/feat/hide-empty-link-previews
Browse files Browse the repository at this point in the history
feat: hide empty link previews
  • Loading branch information
LucasGGamerM authored Nov 8, 2023
2 parents 288043c + 022e61b commit 99e8a53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ public void onBind(LinkCardStatusDisplayItem item){
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
Expand Down
4 changes: 2 additions & 2 deletions mastodon/src/main/res/layout/display_item_link_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99e8a53

Please sign in to comment.