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