diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java index b2aaa46399..a2c824fdcd 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java @@ -396,6 +396,8 @@ public static ArrayList buildItems(BaseStatusListFragment List nonGapItems=gap!=null ? items.subList(0, items.size()-1) : items; WarningFilteredStatusDisplayItem warning=applyingFilter==null ? null : new WarningFilteredStatusDisplayItem(parentID, fragment, statusForContent, nonGapItems, applyingFilter); + if(warning!=null) + warning.inset=inset; return applyingFilter==null ? items : new ArrayList<>(gap!=null ? List.of(warning, gap) : Collections.singletonList(warning) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/WarningFilteredStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/WarningFilteredStatusDisplayItem.java index 2d061a14d9..bd8fc60b44 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/WarningFilteredStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/WarningFilteredStatusDisplayItem.java @@ -10,6 +10,7 @@ import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.model.LegacyFilter; import org.joinmastodon.android.model.Status; +import org.joinmastodon.android.ui.OutlineProviders; import java.util.List; @@ -50,6 +51,9 @@ public void onBind(WarningFilteredStatusDisplayItem item){ filteredItems=item.filteredItems; String title=item.applyingFilter.title; text.setText(item.parentFragment.getString(R.string.sk_filtered, title)); + + itemView.setClipToOutline(item.inset); + itemView.setOutlineProvider(item.inset ? OutlineProviders.roundedRect(12) : null); } @Override diff --git a/mastodon/src/main/res/layout/display_item_warning.xml b/mastodon/src/main/res/layout/display_item_warning.xml index 458fb9abf3..4bec2a7c7c 100644 --- a/mastodon/src/main/res/layout/display_item_warning.xml +++ b/mastodon/src/main/res/layout/display_item_warning.xml @@ -29,8 +29,7 @@ android:layout_weight="1" android:singleLine="true" android:ellipsize="end" - android:visibility="visible" - /> + android:visibility="visible"/> \ No newline at end of file