mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-16 19:18:52 +01:00
Allow for nullable cursor when syncing message
This commit is contained in:
@@ -38,7 +38,7 @@ class ReceiveMms @Inject constructor(
|
||||
|
||||
override fun buildObservable(params: Uri): Flowable<*> {
|
||||
return Flowable.just(params)
|
||||
.flatMap { uri -> syncManager.syncMessage(uri) } // Sync the message
|
||||
.mapNotNull { uri -> syncManager.syncMessage(uri) } // Sync the message
|
||||
.filter { message ->
|
||||
// Because we use the smsmms library for receiving and storing MMS, we'll need
|
||||
// to check if it should be blocked after we've pulled it into realm. If it
|
||||
|
||||
@@ -22,13 +22,14 @@ import android.net.Uri
|
||||
import io.reactivex.Flowable
|
||||
import model.Message
|
||||
import repository.SyncRepository
|
||||
import util.extensions.mapNotNull
|
||||
import javax.inject.Inject
|
||||
|
||||
class SyncMessage @Inject constructor(private val syncManager: SyncRepository) : Interactor<Uri>() {
|
||||
|
||||
override fun buildObservable(params: Uri): Flowable<Message> {
|
||||
return Flowable.just(params)
|
||||
.flatMap { uri -> syncManager.syncMessage(uri) }
|
||||
.mapNotNull { uri -> syncManager.syncMessage(uri) }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user