forked from upstream-mirrors/quik
update messagerepo to keep congruence between app db messages and native provider when marking messages seen and read. previous code always threw an exception that was swallowed.
reformatting and small refactoring on mesasgerepo code.
This commit is contained in:
@@ -57,20 +57,20 @@ interface MessageRepository {
|
||||
*/
|
||||
fun getUnreadMessages(threadId: Long): RealmResults<Message>
|
||||
|
||||
fun markAllSeen()
|
||||
fun markAllSeen(): Int
|
||||
|
||||
fun markSeen(threadId: Long)
|
||||
fun markSeen(threadId: Long): Int
|
||||
|
||||
fun markRead(vararg threadIds: Long)
|
||||
fun markRead(threadIds: Collection<Long>): Int
|
||||
|
||||
fun markUnread(vararg threadIds: Long)
|
||||
fun markUnread(threadIds: Collection<Long>): Int
|
||||
|
||||
fun sendMessage(
|
||||
subId: Int,
|
||||
threadId: Long,
|
||||
addresses: List<String>,
|
||||
addresses: Collection<String>,
|
||||
body: String,
|
||||
attachments: List<Attachment>,
|
||||
attachments: Collection<Attachment>,
|
||||
delay: Int = 0
|
||||
)
|
||||
|
||||
@@ -103,7 +103,7 @@ interface MessageRepository {
|
||||
|
||||
fun markDeliveryFailed(id: Long, resultCode: Int)
|
||||
|
||||
fun deleteMessages(vararg messageIds: Long)
|
||||
fun deleteMessages(messageIds: Collection<Long>)
|
||||
|
||||
/**
|
||||
* Returns the number of messages older than [maxAgeDays] per conversation
|
||||
|
||||
Reference in New Issue
Block a user