split out FilteredStatusViewHolder from StatusBaseViewHolder (#4543)

This is way more efficient than before as less views need to be inflated
and bound for a filtered status to be rendered. It also should fix the
bug where sometimes a `StatusViewHolder` that is set up for showing a
status gets bound to a status that is filtered, leading to a crash.
This commit is contained in:
Konrad Pozniak 2024-07-05 10:13:37 +02:00 committed by GitHub
commit 326676a9c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 107 additions and 96 deletions

View file

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/status_filtered_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
@ -12,11 +12,10 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="0dp"
android:text="Filter: MyFilter"
android:textAlignment="center"
android:textColor="?android:textColorSecondary"
android:textSize="?attr/status_text_medium"
tools:ignore="HardcodedText" />
tools:text="Filter: MyFilter" />
<Button
android:id="@+id/status_filter_show_anyway"

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/item_status" />
<include
layout="@layout/item_status_filtered"
android:visibility="gone"
/>
</FrameLayout>