forked from upstream-mirrors/quik
Use RealmAdapter for conversation info media
This commit is contained in:
@@ -19,15 +19,19 @@
|
||||
package model
|
||||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.RealmResults
|
||||
import io.realm.annotations.LinkingObjects
|
||||
import io.realm.annotations.PrimaryKey
|
||||
|
||||
open class MmsPart : RealmObject() {
|
||||
|
||||
@PrimaryKey var id: Long = 0
|
||||
var messageId: Long = 0
|
||||
var type: String = ""
|
||||
|
||||
var text: String? = null
|
||||
var image: String? = null
|
||||
|
||||
@LinkingObjects("parts")
|
||||
val messages: RealmResults<Message>? = null
|
||||
|
||||
}
|
||||
@@ -20,7 +20,6 @@ package repository
|
||||
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.Maybe
|
||||
import io.reactivex.Observable
|
||||
import io.realm.RealmResults
|
||||
import model.Conversation
|
||||
import model.Message
|
||||
@@ -56,7 +55,7 @@ interface MessageRepository {
|
||||
|
||||
fun getPart(id: Long): MmsPart?
|
||||
|
||||
fun getPartsForConversation(threadId: Long): Observable<List<MmsPart>>
|
||||
fun getPartsForConversation(threadId: Long): RealmResults<MmsPart>
|
||||
|
||||
/**
|
||||
* Retrieves the list of messages which should be shown in the notification
|
||||
|
||||
Reference in New Issue
Block a user