mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Reduce number of errors in gradle build
This commit is contained in:
@@ -36,7 +36,7 @@ class ContactRepository @Inject constructor(val context: Context) {
|
||||
|
||||
fun findContactUri(address: String): Single<Uri> {
|
||||
return Flowable.just(address)
|
||||
.map { address -> Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(address)) }
|
||||
.map { Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(address)) }
|
||||
.flatMap { uri -> context.contentResolver.query(uri, arrayOf(ContactsContract.PhoneLookup._ID), null, null, null).asFlowable() }
|
||||
.firstOrError()
|
||||
.map { cursor -> cursor.getString(cursor.getColumnIndexOrThrow(ContactsContract.PhoneLookup._ID)) }
|
||||
|
||||
@@ -138,7 +138,8 @@ class MessageRepository @Inject constructor(
|
||||
return Realm.getDefaultInstance()
|
||||
.where(Message::class.java)
|
||||
.equalTo("threadId", threadId)
|
||||
.findAllSorted("date")
|
||||
.sort("date")
|
||||
.findAll()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,7 +152,8 @@ class MessageRepository @Inject constructor(
|
||||
.equalTo("seen", false)
|
||||
.equalTo("read", false)
|
||||
.equalTo("threadId", threadId)
|
||||
.findAllSorted("date")
|
||||
.sort("date")
|
||||
.findAll()
|
||||
}
|
||||
|
||||
fun markArchived(threadId: Long) {
|
||||
|
||||
Reference in New Issue
Block a user