Improve thread list item UI
This commit is contained in:
parent
8a1d008b3c
commit
6568091f29
|
@ -33,6 +33,7 @@ import im.vector.app.core.extensions.setLeftDrawable
|
|||
import im.vector.app.core.utils.DimensionConverter
|
||||
import im.vector.app.features.displayname.getBestName
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import org.matrix.android.sdk.api.session.threads.ThreadNotificationState
|
||||
import org.matrix.android.sdk.api.util.MatrixItem
|
||||
|
||||
|
@ -60,9 +61,11 @@ abstract class ThreadListItem : VectorEpoxyModel<ThreadListItem.Holder>() {
|
|||
holder.dateTextView.text = date
|
||||
if (rootMessageDeleted) {
|
||||
holder.rootMessageTextView.text = holder.view.context.getString(R.string.event_redacted)
|
||||
holder.rootMessageTextView.setTextColor(ThemeUtils.getColor(holder.view.context, R.attr.vctr_content_secondary))
|
||||
holder.rootMessageTextView.setLeftDrawable(R.drawable.ic_trash_16, R.attr.vctr_content_tertiary)
|
||||
holder.rootMessageTextView.compoundDrawablePadding = DimensionConverter(holder.view.context.resources).dpToPx(10)
|
||||
} else {
|
||||
holder.rootMessageTextView.setTextColor(ThemeUtils.getColor(holder.view.context, R.attr.vctr_content_primary))
|
||||
holder.rootMessageTextView.text = rootMessage
|
||||
holder.rootMessageTextView.clearDrawables()
|
||||
}
|
||||
|
|
|
@ -73,8 +73,8 @@
|
|||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?vctr_content_primary"
|
||||
|
@ -87,12 +87,12 @@
|
|||
android:id="@+id/threadSummaryConstraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
android:contentDescription="@string/room_threads_filter"
|
||||
android:maxWidth="496dp"
|
||||
android:minWidth="144dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/threadSummaryTitleTextView"
|
||||
app:layout_constraintTop_toBottomOf="@id/threadSummaryRootMessageTextView"
|
||||
|
|
Loading…
Reference in New Issue