Upgrade kotlin to 1.6.21

Also fix a collection of warnings.
This commit is contained in:
Cody Henthorne
2022-05-18 14:05:17 -04:00
committed by GitHub
parent 42b0842aab
commit db4d072bd9
85 changed files with 250 additions and 474 deletions

View File

@@ -1,19 +0,0 @@
package org.thoughtcrime.securesms.util.rx
import com.google.android.gms.tasks.Task
import io.reactivex.rxjava3.core.Single
/**
* Convert a [Task] into a [Single].
*/
fun <T : Any> Task<T>.toSingle(): Single<T> {
return Single.create { emitter ->
addOnCompleteListener {
if (it.isSuccessful && !emitter.isDisposed) {
emitter.onSuccess(it.result)
} else if (!emitter.isDisposed) {
emitter.onError(it.exception)
}
}
}
}