Commit 1032d8e4 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Adds unread chat room name style.

parent 9639a92b
......@@ -53,10 +53,12 @@ class RoomViewHolder(itemView: View, private val listener: (RoomUiModel) -> Unit
if (room.unread == null) text_total_unread_messages.text = "!"
if (room.unread != null) text_total_unread_messages.text = room.unread
if (room.mentions) text_total_unread_messages.text = "@${room.unread}"
text_chat_name.setTextAppearance(context, R.style.ChatList_ChatName_Unread_TextView)
text_timestamp.setTextAppearance(context, R.style.ChatList_Timestamp_Unread_TextView)
text_last_message.setTextAppearance(context, R.style.ChatList_LastMessage_Unread_TextView)
text_total_unread_messages.isVisible = true
} else {
text_chat_name.setTextAppearance(context, R.style.ChatList_ChatName_TextView)
text_timestamp.setTextAppearance(context, R.style.ChatList_Timestamp_TextView)
text_last_message.setTextAppearance(context, R.style.ChatList_LastMessage_TextView)
text_total_unread_messages.isInvisible = true
......
......@@ -108,13 +108,18 @@
<!-- Chat list -->
<style name="ChatList.ChatName.TextView" parent="TextAppearance.AppCompat.Title">
<item name="android:textSize">16sp</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textStyle">bold</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:ellipsize">end</item>
<item name="android:maxLines">1</item>
</style>
<style name="ChatList.ChatName.Unread.TextView" parent="ChatList.ChatName.TextView">
<item name="android:fontFamily">sans-serif</item>
<item name="android:textStyle">bold</item>
</style>
<style name="ChatList.LastMessage.TextView" parent="TextAppearance.AppCompat.Title">
<item name="android:textSize">14sp</item>
<item name="android:fontFamily">sans-serif</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment