forked from upstream-mirrors/quik
Index fields that are used when querying messages and conversations
This commit is contained in:
@@ -20,14 +20,15 @@ package data.model
|
||||
|
||||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.Index
|
||||
import io.realm.annotations.PrimaryKey
|
||||
|
||||
open class Conversation : RealmObject() {
|
||||
|
||||
@PrimaryKey var id: Long = 0
|
||||
var recipients: RealmList<Recipient> = RealmList()
|
||||
var archived: Boolean = false
|
||||
var blocked: Boolean = false
|
||||
@Index var archived: Boolean = false
|
||||
@Index var blocked: Boolean = false
|
||||
var draft: String = ""
|
||||
|
||||
fun getTitle(): String {
|
||||
|
||||
@@ -23,6 +23,7 @@ import android.net.Uri
|
||||
import android.provider.Telephony.*
|
||||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.Index
|
||||
import io.realm.annotations.PrimaryKey
|
||||
|
||||
open class Message : RealmObject() {
|
||||
@@ -36,7 +37,7 @@ open class Message : RealmObject() {
|
||||
// since it's our primary key for the single message object, so we'll store the original id in
|
||||
// case we need to access the original message item in the content provider
|
||||
var contentId: Long = 0
|
||||
var threadId: Long = 0
|
||||
@Index var threadId: Long = 0
|
||||
var address: String = ""
|
||||
var boxId: Int = 0
|
||||
var type: String = ""
|
||||
|
||||
Reference in New Issue
Block a user