Reimplement contact chips with a recyclerview.

This commit is contained in:
Alex Hart
2022-06-29 09:10:08 -03:00
committed by Cody Henthorne
parent 4215b0391d
commit 7bd34d2b99
6 changed files with 191 additions and 118 deletions

View File

@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.util.rx
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.Scheduler
import io.reactivex.rxjava3.disposables.Disposable
import io.reactivex.rxjava3.processors.BehaviorProcessor
import io.reactivex.rxjava3.schedulers.Schedulers
import io.reactivex.rxjava3.subjects.PublishSubject
@@ -31,4 +32,10 @@ class RxStore<T : Any>(
fun update(transformer: (T) -> T) {
actionSubject.onNext(transformer)
}
fun <U> update(flowable: Flowable<U>, transformer: (U, T) -> T): Disposable {
return flowable.subscribe {
actionSubject.onNext { t -> transformer(it, t) }
}
}
}