mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:09:32 +01:00
Fix voice note playback and wave form generation in CFv2.
This commit is contained in:
@@ -58,3 +58,18 @@ fun <S : Subject<T>, T : Any> Observable<T>.subscribeWithSubject(
|
||||
|
||||
return subject
|
||||
}
|
||||
|
||||
fun <S : Subject<T>, T : Any> Single<T>.subscribeWithSubject(
|
||||
subject: S,
|
||||
disposables: CompositeDisposable
|
||||
): S {
|
||||
subscribeBy(
|
||||
onSuccess = {
|
||||
subject.onNext(it)
|
||||
subject.onComplete()
|
||||
},
|
||||
onError = subject::onError
|
||||
).addTo(disposables)
|
||||
|
||||
return subject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user