https://kotlinlang.org logo
#koin
Title
# koin
m

Merseyside

07/15/2022, 9:43 AM
Hi! I have a case which can't find a way to resolve. I have two "application states" - logged in and logged out. When I logged in I want to load a module with specific instances for example repos, useCases. When I log out - unload them. Some repos needs coroutine scope that must be active only when we logged in. I can't find a way how to close coroutine scope when I need to unload modules. Any suggestions?
a

arnaud.giuliani

07/18/2022, 6:41 AM
posssibilities either use load/unload of modules: • https://insert-koin.io/docs/3.1/reference/koin-core/start-koin/#unloading-modules
first will let you drop the modules you don’t want
2nd you have to setup by hand your injection, dependening on how you want to keep you instances
2 Views