rmyhal
08/03/2020, 1:11 PMorafaaraujo
08/03/2020, 1:13 PMBroadcastChannel<Any>(1)
Where Any is your objectorafaaraujo
08/03/2020, 1:14 PM1 is for any positive number less the max of intorafaaraujo
08/03/2020, 1:15 PMandylamax
08/03/2020, 1:15 PMBroadcastChannel<T> deprecated in favor of flow ?orafaaraujo
08/03/2020, 1:16 PMFlow that acts as a PublichSubject until noworafaaraujo
08/03/2020, 1:16 PMflosch
08/03/2020, 1:16 PMorafaaraujo
08/03/2020, 1:17 PMrmyhal
08/03/2020, 1:30 PMwasyl
08/03/2020, 1:33 PMtypealias PublishChannel<T> = BroadcastChannel<T>
typealias BehaviorChannel<T> = ConflatedBroadcastChannel<T>
fun <T> publishChannel(): PublishChannel<T> = BroadcastChannel(1)
fun <T> behaviorChannel(defaultValue: T? = null): BehaviorChannel<T> =
defaultValue?.let { ConflatedBroadcastChannel(it) } ?: ConflatedBroadcastChannel()orafaaraujo
08/03/2020, 2:03 PMtravis
08/04/2020, 4:56 PM