https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
orbit-mvi
  • s

    sebastien.rouif

    10/30/2019, 11:12 AM
    you should have created #babylonlibraries (like #squarelibraries )
    :trollface: 2
    m
    • 2
    • 2
  • m

    Mikolaj Leszczynski

    10/31/2019, 11:08 AM
    Version
    1.2.0
    has been released with a minor improvement to the DSL 🙂
    s
    • 2
    • 3
  • c

    Carlos Muñoz

    11/04/2019, 11:00 AM
    Hello everyone! Breaking the ice here with the first question, or more precisely asking for general feedback about how do you usually organize action transformations, and if do you consider scalable an approach like the one below: - Have a
    Status<T>
    class to be used as the output of any transformation (basically the result type of our use case executions). It can take the values
    Status.Failure(e: Throwable
    ,
    Status.Loading
    , and
    Status.Result(payload: T)
    . - Listen to any possible resulting status of a given type and reduce them all together. - If necessary, listen to specific result statuses separately. In the case shown below, side effects are different (
    Status.Loading
    doesn't have side effects,
    Status.Result
    posts a side effect,
    Status.Failure
    has both internal and view related side effects).
    m
    • 2
    • 17
  • m

    Mikolaj Leszczynski

    11/12/2019, 10:53 AM
    👋 Orbit 2.0.0 has been released with many DSL improvements! https://github.com/babylonhealth/orbit-mvi/releases/tag/2.0.0
    c
    g
    • 3
    • 4
  • e

    expensivebelly

    11/15/2019, 10:13 AM
    Hello Orbiters. Quick question. What would be the easy way to achieve retry 3 times for a given network request while showing to the user
    First/Second/Third retry attempt
    and then either fail or succeed at that point? Thanks
    k
    • 2
    • 8
  • m

    Mikolaj Leszczynski

    11/20/2019, 4:58 PM
    Orbit
    3.0.0
    has been released! 🎉 https://github.com/babylonhealth/orbit-mvi/releases/tag/3.0.0
    👍 5
    p
    • 2
    • 2
  • s

    sebastien.rouif

    04/29/2020, 11:03 AM
    @Mikolaj Leszczynski as I understand it, a new Thread/Scheduler is created for every Container https://github.com/babylonhealth/orbit-mvi/blob/e9c071487167ce21114a260514d2482b727be52f/orbit/src/main/java/com/babylon/orbit/BaseOrbitContainer.kt#L133 . shouldn’t the scheduler be shutdown when disposing ?
    m
    • 2
    • 8
  • k

    kikermo

    05/03/2020, 11:10 AM
    Hey @Mikolaj Leszczynski. We were talking about this previously, but I am using orbit with rx, and on the transformation, I pass the
    eventObservable
    and
    currentState
    to my transformers that I have defined outside (similar to the example). When I pass that
    currentState
    , I am passing its value on the cretion of the stream so it will always be the initial version of that state. In order to have the latest value of that state, the actual current state, what I did was looping back an object that had the things I needed from the state to make my request. That solves my problem, but I was thinking what other alternatives we have. One would be modifying the stream with a
    map
    but maybe there is a more obvious one I am missing. Thanks in advance.
    m
    • 2
    • 2
  • g

    Giacomo De Bacco

    05/25/2020, 1:38 PM
    Hey, is there any other sample app out there that covers navigation, side effects and chain reactions a little better? I am struggling a bit to piece everything together
    m
    • 2
    • 9
  • m

    Mikolaj Leszczynski

    03/05/2021, 3:02 PM
    Hi @Ravi, this is on our TODO list. See: https://github.com/orbit-mvi/orbit-mvi/issues/8 https://github.com/orbit-mvi/orbit-mvi/issues/10
    🙌 3
    r
    • 2
    • 5
  • r

    Ravi

    03/28/2021, 10:47 PM
    @Mikolaj Leszczynski can we change the public val stateFlow: Flow<STATE> in Container to public val stateFlow: StateFlow<STATE>. Also while initialzing container in viewmodel we will be setting up initial state. In jetpack compose while consuming this I've to set that initial value again. Please let me know your thoughts on this, I can add the same on github discussion
    @Composable
    fun SomeCompose(viewModel: SomeViewModel){
        val someState = viewModel.container.stateFlow.collectAsState(initial = initialState)
    }
    we can get initial state from (Mutable)StateFlow and collectAsState()
    m
    • 2
    • 1
  • o

    Oleksii Malovanyi

    03/30/2021, 2:47 PM
    Hello. I have a feature request, wanna discuss quickly: what do you think about new property for
    Container.Settings
    of type
    CoroutineExceptionHandler
    , so we could have a default exception handler for Android ViewModel?
    m
    • 2
    • 25
  • o

    Oleksii Malovanyi

    04/19/2021, 6:47 AM
    Hey guys, do you have a date to release a new version with the latest changes?
    m
    • 2
    • 11
  • m

    miqbaldc

    04/22/2021, 9:06 AM
    thanks for the exception handler features guys ❤️ https://github.com/orbit-mvi/orbit-mvi/blob/main/samples/orbit-calculator/src/main[…]lin/org/orbitmvi/orbit/sample/calculator/CalculatorViewModel.kt is it possible to idiomaticly make the exception catch as a flow?
    val state = MutableStateFlow(...)
    
    state.map {
      // a reducer
    }.catch {
      // catch the exception happened in a reducer
    }
    suggestion:
    reduce { 
       // omitted
    }.catch {
       when (exception) {
         // to distinguish between stateA & stateB exception, unless it's a general toast
         ExceptionFromStateA -> state.copy(a = // do something with data specific to stateA)
         ExceptionFromStateB -> state.copy(b = // similar to the above apprach)
       }
    
       // or a general error message
       state.copy(errorMessage = it.message)
    }
    m
    • 2
    • 11
  • m

    miqbaldc

    04/27/2021, 4:47 AM
    Does orbit-mvi also support SingleLiveEvent-like alternative?
    unable to find the samples in orbit-mvi though, did I miss something? 🙏
    Been reading this article and seems
    StateFlow
    & Android lifecycle required additional configuration (there’s a new API from google to support this) also there’s an interesting discussion about it in here
    m
    • 2
    • 4
  • o

    Oleksii Malovanyi

    04/29/2021, 1:00 PM
    Hey guys, hi! I wonder, how do you handle infinite flow subscriptions? Currently, the only way works for me is
    flow<Unit> {
                while (true) {
                    delay(3000)
                    emit(Unit)
                }
            }.flowOn(<http://Dispatchers.IO|Dispatchers.IO>).onEach { _ ->
                intent { reduce { it } }
            }.launchIn(viewModelScope)
    Unfortunately
    intent
    coroutine couldn’t be used for this, as it would block all new messages from the RealContainer’s channel
    intent {
                flow<Unit> {
                    while (true) {
                        delay(3000)
                        emit(Unit)
                    }
                }.flowOn(<http://Dispatchers.IO|Dispatchers.IO>).onEach { _ ->
                    intent { reduce { it } }
                }.collect()
            }
    ➕ 1
    m
    m
    • 3
    • 31
  • m

    Mikolaj Leszczynski

    04/30/2021, 6:00 AM
    Orbit v3.1.1 has been released, containing a hotfix for a bug blocking event loop mechanics. https://github.com/orbit-mvi/orbit-mvi/releases/tag/3.1.1
    🙌 2
    r
    • 2
    • 2
  • m

    miqbaldc

    05/04/2021, 8:49 AM
    found this

    great talks▾

    from Luca Nicoletti, the sample shown using orbit earlier version with alpha version of jetpack compose Stocklist, Post &amp; Calculator seems using Views, cmiiw if there’s a sample on v3.1.1 using Jetpack Compose already that I’m not aware of 🙏
    m
    a
    • 3
    • 12
  • o

    Oleksii Malovanyi

    06/10/2021, 3:51 PM
    Hey guys, I’m kinda dumb, but can’t make it work: how you test the
    delay()
    if occurs inside the
    intent
    block? I’ve tried to pass
    TestCoroutineDispatcher
    as the
    orbitDispatcher
    and then
    advanceTimeBy
    but it has no effect and I have to wait for the delay to finish 😞
    m
    • 2
    • 129
  • a

    asyn

    06/13/2021, 10:35 AM
    r
    m
    a
    • 4
    • 3
  • s

    Sami Eljabali

    06/15/2021, 9:55 PM
    Hi folks! 👋 In looking at the framework I'm rather impressed & am considering up-taking it for a professional project. I can't help but wonder why BabylonHealth dropped support for the project. I couldn't find an article describing the thought process there. Were there pain-points with the framework in production? Was MVVM found easier to deal with in the long run? etc. Any insights would help with my decision process & sell to management. Thanks!
    ❤️ 2
    m
    a
    • 3
    • 25
  • m

    miqbaldc

    06/16/2021, 8:29 AM
    Does below snippet considered as multiple streams? Also, is it currently possible to do this approach (in snippet)? Detailed in thread~
    StockViewModelMultipleStream_kt.cpp
    m
    • 2
    • 9
  • m

    Mikolaj Leszczynski

    06/28/2021, 12:17 PM
    Orbit MVI 4.0.0 has been released! This release includes big improvements to unit tests that result in breaking changes. Special thanks to @Oleksii Malovanyi for contributing! https://github.com/orbit-mvi/orbit-mvi/releases/tag/4.0.0
    ❤️ 1
    🎉 4
    o
    r
    • 3
    • 2
  • o

    Oleksii Malovanyi

    06/30/2021, 3:14 PM
    Hey guys, me again ¯\_(ツ)_/¯ I’ve been adopting new 4.0.0 test model and found an issue: the
    exceptionHandler
    is never used so any exception would go to the
    TestCoroutineExceptionHandler
    which would fail the test afterwards (runBlockingTest is used)
    m
    m
    • 3
    • 27
  • o

    Oleksii Malovanyi

    07/02/2021, 10:01 AM
    I have another proposal on testing 😬 https://github.com/orbit-mvi/orbit-mvi/pull/52
    👍 2
    m
    • 2
    • 12
  • o

    Oleksii Malovanyi

    07/02/2021, 10:54 AM
    Unfortunately, I have another change request: it’s about
    runOnCreate
    in tests -> it blocks, so if you have a delay or withTimeout call right when the container is created, your test would still be live timed 😞 https://github.com/orbit-mvi/orbit-mvi/pull/53
    👍 1
    m
    a
    • 3
    • 26
  • m

    miqbaldc

    07/13/2021, 2:07 PM
    https://github.com/orbit-mvi/orbit-mvi/discussions/57 Curious about the time travel debugging features 🙏
    a
    • 2
    • 1
  • r

    Ravi

    07/15/2021, 2:14 PM
    More changes will happen to testing in future? coz recent breaking changes caused a lot of rewrite of Unittest cases for us. Should we stick to the existing test framework or write UTs by asserting stateFlows and sideFlow results using https://github.com/cashapp/turbine.
    m
    • 2
    • 2
  • o

    Oleksii Malovanyi

    07/16/2021, 3:09 PM
    Hey guys, I’ve found a nasty issue: the neverending flow collection from the
    intent{}
    – it’s never canceled on parent’s
    scope.cancel
    in case there is an
    exceptionHandler
    installed, e.g.: something like this would create a mem. leak:
    ) : ViewModel(),
        ContainerHost<ProfileState, ProfileEffect> {
    
        override val container: Container<ProfileState, ProfileEffect> = container(
            initialState = ProfileState(authorized = null, account = null),
            savedStateHandle = savedStateHandle,
            settings = Container.Settings(exceptionHandler = exceptionHandler.asCoroutineExceptionHandler()),
        ) {
            intent {
                subscribeToSessionUseCase().collect {
                    reduce { state.copy(authorized = it != null) }
                }
            }
        }
    Here is the sneak peak of the fix – I gonna create a test for that, but wonna let you know early https://github.com/orbit-mvi/orbit-mvi/pull/58
    a
    m
    • 3
    • 36
  • m

    Mikolaj Leszczynski

    07/19/2021, 9:06 PM
    Some exciting news to share. We’ve just released our new docs website under orbit-mvi.org 🎉 Also look at us trying hard to fit in with the kids these days - we are now on the twittersphere at https://twitter.com/orbit_mvi ! Last but not least, orbit
    4.1.3
    has been released with yet another fix provided by @Oleksii Malovanyi!
    🎉 7
    😮rbit-mvi: 5
    🤘 7
    m
    e
    • 3
    • 2
Powered by Linen
Title
m

Mikolaj Leszczynski

07/19/2021, 9:06 PM
Some exciting news to share. We’ve just released our new docs website under orbit-mvi.org 🎉 Also look at us trying hard to fit in with the kids these days - we are now on the twittersphere at https://twitter.com/orbit_mvi ! Last but not least, orbit
4.1.3
has been released with yet another fix provided by @Oleksii Malovanyi!
🎉 7
😮rbit-mvi: 5
🤘 7
m

miqbaldc

07/21/2021, 12:12 AM
Thanks guys, love reading the core section in here: https://orbit-mvi.org/orbit-core/overview#limitations
🙇 1
e

Eric Ampire [MOD]

08/04/2021, 9:54 PM
I did not know that such an interesting framework existed
View count: 5