Use RealmAdapter for conversation info media

This commit is contained in:
Moez Bhatti
2018-04-05 05:21:07 -04:00
parent 8f2415afa2
commit 7a8aea0f38
8 changed files with 25 additions and 29 deletions
+5 -1
View File
@@ -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