Unread line: follow unread counter color

Change-Id: Ia3cd51364517276cfc438fe0f7700d11de7ff00a
This commit is contained in:
SpiritCroc 2022-03-04 11:57:58 +01:00
parent 0a4f07f07f
commit 3d57cb880c
2 changed files with 10 additions and 1 deletions

View File

@ -78,6 +78,15 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>() {
holder.lastEventView.text = lastFormattedEvent.charSequence
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted, unreadCount ?: 0, markedUnread))
holder.unreadIndentIndicator.isVisible = hasUnreadMessage
// Mirror unreadCounterBadgeView colors
holder.unreadIndentIndicator.setBackgroundColor(
when {
showHighlighted -> ThemeUtils.getColor(holder.unreadIndentIndicator.context, R.attr.colorError)
unreadNotificationCount > 0 || markedUnread -> ThemeUtils.getColor(holder.unreadIndentIndicator.context, R.attr.colorAccent)
hasUnreadMessage -> ThemeUtils.getColor(holder.unreadIndentIndicator.context, R.attr.vctr_content_tertiary) // same color as unread counter bg would be hard to spot
else -> 0
}
)
holder.draftView.isVisible = hasDraft
avatarRenderer.render(matrixItem, holder.avatarImageView)
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)

View File

@ -15,7 +15,7 @@
android:id="@+id/roomUnreadIndicator"
android:layout_width="4dp"
android:layout_height="0dp"
android:background="?vctr_content_secondary"
tools:background="?colorAccent"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"