Reorder MessageTransaction functions

This commit is contained in:
Moez Bhatti
2017-09-29 18:25:29 -04:00
parent 132654b29c
commit d852349bf0
3 changed files with 16 additions and 16 deletions
@@ -2,14 +2,14 @@ package com.moez.QKSMS.data.datasource
interface MessageTransaction {
fun markSent(id: Long)
fun markFailed(id: Long)
fun markSeen()
fun markSeen(threadId: Long)
fun markRead(threadId: Long)
fun markSent(id: Long)
fun markFailed(id: Long)
}
@@ -13,12 +13,6 @@ import javax.inject.Named
class NativeMessageTransaction @Inject @Named("Native") constructor(private val context: Context) : MessageTransaction {
override fun markSent(id: Long) {
}
override fun markFailed(id: Long) {
}
override fun markSeen() {
// TODO also need to mark MMS in ContentProvider as Seen
val projection = arrayOf(BaseColumns._ID)
@@ -71,4 +65,10 @@ class NativeMessageTransaction @Inject @Named("Native") constructor(private val
}
}
override fun markSent(id: Long) {
}
override fun markFailed(id: Long) {
}
}
@@ -7,12 +7,6 @@ import io.realm.Realm
class RealmMessageTransaction : MessageTransaction {
override fun markSent(id: Long) {
}
override fun markFailed(id: Long) {
}
override fun markSeen() {
Schedulers.io().scheduleDirect {
val realm = Realm.getDefaultInstance()
@@ -61,4 +55,10 @@ class RealmMessageTransaction : MessageTransaction {
}
}
override fun markSent(id: Long) {
}
override fun markFailed(id: Long) {
}
}