forked from upstream-mirrors/quik
Change draft indicator to be in the snippet
This commit is contained in:
+5
-4
@@ -109,16 +109,17 @@ class ConversationsAdapter @Inject constructor(
|
||||
holder.title.collapseEnabled = conversation.recipients.size > 1
|
||||
holder.title.text = buildSpannedString {
|
||||
append(conversation.getTitle())
|
||||
if (conversation.draft.isNotEmpty()) {
|
||||
color(theme) { append(" " + context.getString(R.string.main_draft)) }
|
||||
}
|
||||
}
|
||||
holder.date.text = conversation.date.takeIf { it > 0 }?.let(dateFormatter::getConversationTimestamp)
|
||||
holder.snippet.text = when {
|
||||
conversation.draft.isNotEmpty() -> conversation.draft
|
||||
conversation.draft.isNotEmpty() -> context.getString(R.string.main_sender_draft, conversation.draft)
|
||||
conversation.me -> context.getString(R.string.main_sender_you, conversation.snippet)
|
||||
else -> conversation.snippet
|
||||
}
|
||||
|
||||
// Make the preview in italics if draft
|
||||
if (conversation.draft.isNotEmpty()) holder.snippet.setTypeface(null, Typeface.ITALIC)
|
||||
|
||||
holder.pinned.isVisible = conversation.pinned
|
||||
holder.unread.setTint(theme)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user