Unread line: follow unread counter color
Change-Id: Ia3cd51364517276cfc438fe0f7700d11de7ff00a
This commit is contained in:
parent
0a4f07f07f
commit
3d57cb880c
|
@ -78,6 +78,15 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>() {
|
||||||
holder.lastEventView.text = lastFormattedEvent.charSequence
|
holder.lastEventView.text = lastFormattedEvent.charSequence
|
||||||
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted, unreadCount ?: 0, markedUnread))
|
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted, unreadCount ?: 0, markedUnread))
|
||||||
holder.unreadIndentIndicator.isVisible = hasUnreadMessage
|
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
|
holder.draftView.isVisible = hasDraft
|
||||||
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
||||||
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
android:id="@+id/roomUnreadIndicator"
|
android:id="@+id/roomUnreadIndicator"
|
||||||
android:layout_width="4dp"
|
android:layout_width="4dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="?vctr_content_secondary"
|
tools:background="?colorAccent"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
Loading…
Reference in New Issue