saket
07/04/2021, 5:20 AMlehakorshun
07/10/2021, 7:56 AMSingle<T>.doOnAfterSuccess
, as doc says
Calls the action with the emitted value when the Single signals onSuccess. The action is called after the observer is called.but my action is called first, before onSuccess in subscriber. what can be wrong?
saket
08/13/2021, 4:36 AMSource
?
I’m consuming anfreezes both its upstream source and downstream observer, all the Disposables (upstream’s and downstream’s) are frozen as well, all the values (including errors) are not frozen by the operatorsubscribeOn
Observable
from k/native, and I wanted to confirm that doing this is expected:
upstream.map { it.freeze() }
saket
08/13/2021, 2:50 PMstruct FooView: View {
let presenter: FooPresenter
var body: some View {
Present(presenter) { model ->
Text(model.name)
}
}
}
saket
09/04/2021, 6:43 PMAndrew Steinmetz
09/22/2021, 4:49 PMsubscribeOn
and observeOn
. When I was looking at the Todo sample I saw the repository had the following which if I understand correctly will make sure the values being observed are consumed on the background thread? Is there a reason to not also chain a subscribeOn(ioScheduler)
to enforce all values computed are on a background thread? Or is that just SqlDelight only doing queries on a background thread that prevents the need for that?
private fun <T : Any> query(query: (TodoDatabaseQueries) -> Query<T>): Single<Query<T>> =
queries
.observeOn(ioScheduler)
.map(query)
I noticed that in one of the stores that observeOn(mainScheduler)
is only called to make sure updates to UI are done on the UI, but there is no subscribeOn(ioScheduler)
so was curious how the computations were being done on a background thread?
database
.updates
.observeOn(mainScheduler)
.map(Result::ItemsLoaded)
.subscribeScoped(onNext = ::dispatch)
Thanks!Nikola Milovic
09/28/2021, 11:43 AM//inside jsMain actual ChatClient
private val observable : Observable<MessageModel> =
actual fun subscribeToNewMessages(observer or something to subscribe to the stream of messages){
observable.subscribe With The Observer
}
actual fun somehow Clear the Subscription when Neccessary()
socket.on("received_message") { mess ->
observable.somehow Send to observers (mess)
}
Hopefully this makes senseEugen Martynov
10/16/2021, 1:00 PMArkadii Ivanov
10/17/2021, 12:31 AM1.2.1
is released!
• combineLatest
now emits List
copies instead of same instances (#627)
• Used CoroutineExceptionHandler
in coroutines-interop
module for better exception handling (#628)
• Added KDocs for all operators and Subjects
(#632, #633, #640, #642, #643)
• Updated Kotlin to 1.5.30 (#637)
• Added Apple silicon targets (#639)
• Added various buffer
operators (#645)Kyle Roe
12/20/2021, 2:34 PMDmitry Motyl
02/03/2022, 9:45 AMtrashcoder
03/16/2022, 10:50 PMmaybe
, single
and completable
, i ended up creating my own observable. it seems to work but i would like to know, if this is the way that is meant to be used. especially in combination with coroutines.
(see thread for code)Luigi Scarminio
07/20/2022, 12:23 PMfun listFilesFromFTP(ftpConnection : Connection) : Pair<Connection, List<Files>>
connectionObservable.flapMap(::listFilesFromFTP).flapMap(::filterLocalFiles) ... and so on...
Dmitry Motyl
07/28/2022, 12:11 PMdebounce
It works well on iOS, but on Android it doesn’t fire if app is in background near 15 min.
There is some specific I should know ?Luigi Scarminio
08/03/2022, 2:44 PMDmitry Motyl
10/06/2022, 10:46 AMrxjava-interop
What is about Combine
or RxSwift
?
Did somebody try to implement it ?bartosz.malkowski
12/29/2022, 2:07 PMoverride fun observeAll(): Observable<List<RosterPresenceItem>> = queries.query(RosterDatabaseQueries::loadAll)
.observe {
it.executeAsList().map { e -> … }
}
Sometimes I need to push new content from database to all subscribers, when something will be published in
val updateSubject = PublishSubject<Unit>()
I thought that repeatWhen()
should be used for that, but I don't know how to use it.
Any hints?Dmitry Motyl
12/29/2022, 2:13 PMupdateSubject.startWith(Unit).switchMap { database.fetch() }.sharedReplay(1)
Marc
02/10/2023, 12:27 PMStavFX
05/11/2023, 6:17 PMcoroutines-interop
or is there a way to get synchronous calls out of the popular libraries for kmm networking?StavFX
05/11/2023, 6:49 PM@Composeable
fun Foo() {
val state by someReaktiveSingle.asRxJava2SingleSource().subscribeAsState()
...
}
Does that make sense?
Where should the conversion from Reaktive to rx2 happen? It shouldn't really happen in the commonMain
layer, right? iOS won't know what to do with itStavFX
05/12/2023, 8:29 PMDmitry Motyl
06/08/2023, 8:37 AMimplementation("com.badoo.reaktive:rxjava3-interop:1.3.0")
into compose-multiplatform-ios-android-template
and I am getting errors..
Could somebody help to figure out with it ?Arkadii Ivanov
06/08/2023, 4:39 PMMike
07/13/2023, 5:54 AMMike
08/02/2023, 9:09 AMArkadii Ivanov
06/07/2024, 1:08 PMArkadii Ivanov
06/07/2024, 1:09 PM2.2.0
is released with the update to Kotlin 2.0.0
!
Release notes: https://github.com/badoo/Reaktive/releases/tag/2.2.0Andrew Rosenblatt
07/27/2024, 2:44 PMmartmists
11/19/2024, 3:06 PMtoList
states it only works on finite observables. What do I do to get a snapshot state of an infinite observable? (and/or is there a way to clear elements from an observable?) Or is there a different class I should be looking at?