https://kotlinlang.org logo
#moko
Title
# moko
s

SK

03/08/2022, 2:08 PM
Hello there, my team is facing a strange issue when trying to use moko-mvvm, moko-livedata components. We have some code in viewmodel inside viewmodelScope.launch { .. }. Invoking this method (on a button click or something) works for the first time. However, when we repeat the same action, the code inside viewmodelScope.launch doesn't work anymore. @alex009 Can you please help?
a

alex009

03/09/2022, 4:17 PM
hi. we have not encountered this type of problems. maybe someone call
cancel
for
viewModelScope
?
s

SK

03/09/2022, 7:44 PM
Thanks for getting back. They have identified the root cause where viewmodelScope is getting cleared during to a fragment change. Good for now!
4 Views