Luigi Scarminio
08/19/2020, 1:45 PMDmitry Motyl
09/02/2020, 11:52 AMsingleFromCoroutine
and on dispose it will be canceled ?Nikita Khlebushkin
11/02/2020, 10:27 AMOmar Mainegra
12/01/2020, 4:03 PMSingleWrapper<String?>
Is there any particular reason to this change? Or workaround to deal with Nullability/Absent of Values?Mina Eweida
12/11/2020, 10:54 AMMainScope
already tested that on my project, so would it make sense if this is provided in Reaktive through coroutine-interop?Arkadii Ivanov
12/18/2020, 10:57 PM1.4.20
and coroutines to 1.4.2
(#568)
• Added test assertions chaining (#545)
• Added invoke
operator for ValueCallback
and its Consumer
typealias (#554)
• Various performance improvements (#548, #547, #546)
• Use abort()
instead of exitProcess()
in Kotlin/Native reaktiveUncaughtErrorHandler
for better crash stack traces (#567)
• Fixed a bug in Observable.buffer
skip logic (#571)
• Sources are now published for rxjava2-interop
and rxjava3-interop
modules (#560 by @CherryPerry)
• Updated docs (#556)Arkadii Ivanov
12/19/2020, 7:16 PMmaven("<https://dl.bintray.com/badoo/maven>")
saket
12/30/2020, 2:04 AMArkadii Ivanov
02/02/2021, 9:27 AMMina Eweida
05/19/2021, 8:09 AMMike
06/08/2021, 12:21 AMsaket
06/20/2021, 9:11 PMmapper
with the same list _instance_:
Iterable<Observable<T>>.combineLatest(mapper: (List<T>) -> R)
saket
06/26/2021, 10:46 PMCoroutineExceptionHandler
for launching coroutines?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?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?Arkadii Ivanov
12/29/2022, 3:15 PMbartosz.malkowski
12/30/2022, 7:21 AMArkadii Ivanov
12/30/2022, 9:08 AMoverride fun observeAll(): Observable<List<RosterPresenceItem>> =
merge(
queries
.query(RosterDatabaseQueries::loadAll)
.observe {
it.executeAsList().map { e -> … }
},
updateSubject.flatMapSingle {
queries
.query(RosterDatabaseQueries::loadAll)
.single {
it.executeAsList().map { e -> … }
}
}
)
bartosz.malkowski
12/30/2022, 9:45 AMfun <T> Observable<T>.powtorzGdy(observable: Observable<*>): Observable<T> = observable { emitter ->
var listener: Disposable? = this@powtorzGdy.subscribe(
onNext = emitter::onNext, onError = emitter::onError, onComplete = emitter::onComplete
)
observable.subscribe {
listener?.dispose()
listener = this@powtorzGdy.subscribe(
onNext = emitter::onNext, onError = emitter::onError, onComplete = emitter::onComplete
)
}
}
and it works, but I have no idea if it is done correctly 🙂Arkadii Ivanov
12/30/2022, 11:50 AMBehaviorSubject
+ switchMap
:
private val updateSubject = BehaviorSubject(Unit)
override fun observeAll(): Observable<List<RosterPresenceItem>> =
updateSubject.switchMap {
queries
.query(RosterDatabaseQueries::loadAll)
.observe {
it.executeAsList().map { e -> … }
}
}
Here switchMap
replaces your powtorzGdy
function.bartosz.malkowski
12/30/2022, 12:24 PM