minor code cleanup + color customization fix

This commit is contained in:
Tibor Kaputa 2021-09-08 20:03:35 +02:00 committed by GitHub
parent 327b7f673a
commit aa71a39f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -257,6 +257,8 @@ class ConversationsAdapter(
private fun setupView(view: View, conversation: Conversation) {
view.apply {
val smsDraft = context.getSmsDraft(conversation.threadId)
draft_indicator.beVisibleIf(smsDraft != null)
draft_indicator.setTextColor(adjustedPrimaryColor)
conversation_frame.isSelected = selectedKeys.contains(conversation.hashCode())
@ -270,10 +272,6 @@ class ConversationsAdapter(
setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.9f)
}
draft_indicator.apply {
visibility = if (smsDraft != null) View.VISIBLE else View.GONE
}
conversation_date.apply {
text = conversation.date.formatDateOrTime(context, true, false)
setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize * 0.8f)