Don't try to sync message if it has unreadable id

This commit is contained in:
Moez Bhatti
2018-04-05 14:39:13 -04:00
parent 0156b224fe
commit 922fa56947
@@ -145,7 +145,7 @@ class SyncRepositoryImpl @Inject constructor(
else -> return Flowable.empty()
}
val id = tryOrNull { ContentUris.parseId(uri) }
val id = tryOrNull { ContentUris.parseId(uri) } ?: return Flowable.empty()
// Check if the message already exists, so we can reuse the id
val existingId = Realm.getDefaultInstance().use { realm ->