forked from upstream-mirrors/quik
Show unread status for conversations
This commit is contained in:
@@ -16,7 +16,7 @@ open class Conversation() : RealmObject() {
|
||||
var contacts: RealmList<Contact> = RealmList()
|
||||
var snippet: String = ""
|
||||
var snippetCs: String = ""
|
||||
var read: Int = 0
|
||||
var read: Boolean = true
|
||||
var error: Int = 0
|
||||
var hasAttachment: Int = 0
|
||||
|
||||
@@ -36,7 +36,7 @@ open class Conversation() : RealmObject() {
|
||||
|
||||
snippet = cursor.getString(ConversationColumns.SNIPPET) ?: ""
|
||||
snippetCs = cursor.getString(ConversationColumns.SNIPPET_CS) ?: ""
|
||||
read = cursor.getInt(ConversationColumns.READ)
|
||||
read = cursor.getInt(ConversationColumns.READ) == 1
|
||||
error = cursor.getInt(ConversationColumns.ERROR)
|
||||
hasAttachment = cursor.getInt(ConversationColumns.HAS_ATTACHMENT)
|
||||
}
|
||||
|
||||
@@ -31,5 +31,6 @@ class ConversationAdapter(context: Context, data: OrderedRealmCollection<Convers
|
||||
viewHolder.avatar.contacts = conversation.contacts
|
||||
viewHolder.title.text = conversation.getTitle()
|
||||
viewHolder.snippet.text = conversation.snippet
|
||||
viewHolder.snippet.setTextColor(context.resources.getColor(if (conversation.read) R.color.textTertiary else R.color.textPrimary))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user