mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-16 19:18:52 +01:00
#1010 - Message content search
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package model
|
||||
|
||||
data class SearchResult(val query: String, val conversation: Conversation, val messages: Int)
|
||||
@@ -18,19 +18,21 @@
|
||||
*/
|
||||
package repository
|
||||
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.Maybe
|
||||
import io.realm.RealmResults
|
||||
import model.Conversation
|
||||
import model.Message
|
||||
import model.MmsPart
|
||||
import model.SearchResult
|
||||
|
||||
interface MessageRepository {
|
||||
|
||||
fun getConversations(archived: Boolean = false): Flowable<List<Conversation>>
|
||||
fun getConversations(archived: Boolean = false): RealmResults<Conversation>
|
||||
|
||||
fun getConversationsSnapshot(): List<Conversation>
|
||||
|
||||
fun searchConversations(query: String): List<SearchResult>
|
||||
|
||||
fun getBlockedConversations(): RealmResults<Conversation>
|
||||
|
||||
fun getConversationAsync(threadId: Long): Conversation
|
||||
@@ -45,7 +47,7 @@ interface MessageRepository {
|
||||
|
||||
fun saveDraft(threadId: Long, draft: String)
|
||||
|
||||
fun getMessages(threadId: Long): RealmResults<Message>
|
||||
fun getMessages(threadId: Long, query: String = ""): RealmResults<Message>
|
||||
|
||||
fun getMessage(id: Long): Message?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user