jw
09/05/2018, 7:46 PMubu
09/07/2018, 2:41 PMoverride fun onSatelliteClicked() {
mapSubject.take(1).subscribe(this::toggleSatelliteMode)
}
elizarov
09/11/2018, 6:00 PMktor
is based on Kotlin coroutines. Instead of readable.subscrible
you should do readable.consumeEach
(add kotlinx-coroutines-rx1/2
to your dependencies).ursus
09/13/2018, 6:15 AMursus
09/20/2018, 4:56 PMKotlin
09/28/2018, 10:38 AMursus
09/29/2018, 5:12 PMkenkyee
10/02/2018, 11:08 AMSuhit Patil
10/03/2018, 3:52 PMlocke
10/04/2018, 8:30 PMFragment
boundaries?thomasnield
10/14/2018, 12:52 PMrobinchew
10/17/2018, 2:03 PMscan
where the accumulation function has 2 arguments of different types?Alan Lee
10/18/2018, 10:12 PMfun <T> applySchedulers(): FlowableTransformer<T, T> {
return FlowableTransformer {
it.observeOn(mainScheduler).subscribeOn(computationScheduler)
}
}
I’m try to operate on ‘BehaviorProcessor<List<XXX>>’.
behaviorProcessor.compose(applySchedulers())
works but trying to assign the result to Flowable<List<XXX>> causes an error.
Type Inference failed. Expected Type mismatch.
required: Flowable<List<XXX>>, found: Flowable<List<XXX>!>!
How do I resolve the type inference error?ursus
10/19/2018, 1:48 PMjw
10/23/2018, 3:57 AMursus
10/25/2018, 9:31 PMursus
11/07/2018, 5:55 PMusing
?
contentObservable(resolver, uri, handler)
.flatMapSingle {
Single.fromCallable { resolver.query(uri, projection, selection, selectionArgs, sortOrder) }
}
.map<Optional<Contact>> { optionalOf(mapContact(it)) }
where that fromCallable returns Single<Cursor>, so obviously it will not close the cursor if stream gets unsubscribed after that and before mapContact where I actually close the cursor (now), therefore leaking the cursor right?ursus
11/07/2018, 6:05 PMusing
usage?trent
11/11/2018, 3:06 AMtrent
11/11/2018, 3:08 AMursus
11/12/2018, 5:53 PMclass ViewModel {
private val relay = BehaviourRelay.create()
val observable get() = relay
init {
repository.
.operators...
.subscribe(relay)
}
}
class Activity {
onCreate {
viewModel
.observable
.subscribe { }
}
}
ursus
11/13/2018, 2:39 AMrefCount
would dispose it after first UI onDestroy, since its the only subscriberursus
11/13/2018, 4:29 AMursus
11/13/2018, 7:17 PMSchedulers.from(Executors.newSingleThreadExecutor { Thread(it, "SipCallManagerThread") })
, do I need to shutdown it explicitly like a native resource or is leaving it to be GCed okay?ursus
11/14/2018, 1:13 AMswitchMap
which will guarantee atleast one emission of the mapped observable? Or rather concatMap
that will take 1 || takeUntil new upstream emit?Sudhir Singh Khanger
12/03/2018, 10:15 AMursus
12/04/2018, 4:39 AMSlackbot
12/06/2018, 10:56 PMursus
12/14/2018, 5:28 AMClive
12/17/2018, 8:37 PMClive
12/17/2018, 8:37 PMgildor
12/17/2018, 11:34 PMgsala
12/18/2018, 8:32 AM.chunked(n)
if what you want is to group into lists of n
itemsClive
12/18/2018, 3:39 PM