-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Use Kotlin Coroutines for IO executor #235
Use Kotlin Coroutines for IO executor #235
Conversation
1368825
to
e7d6a65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @XinyueZ, thanks for your patience and submitting the first coroutines PR! 👍 Added some comments about the ViewModel and why I think we should contain everything in one file for now.
app/src/main/java/com/google/samples/apps/sunflower/viewmodels/ScopedViewModel.kt
Outdated
Show resolved
Hide resolved
@tiembo I needs more information from your side to complete next change 😕 |
83a04ab
to
a827fb8
Compare
Addressed by android#235 (comment)
@tiembo I have completed the changes-request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for
app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/viewmodels/ScopedViewModel.kt
Outdated
Show resolved
Hide resolved
7474aec
to
4887e15
Compare
…/XinyueZ/android-sunflower into feature/coroutines-app-executors
4887e15
to
9b5309d
Compare
@tiembo I have solved changes request 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR! Nice work.
Author of coroutines codelab here. @tiembo asked me to take a look for coroutines style. Everything is correct as written however I've made some style requests based on our style of starting in the Main
dispatcher and guarding functions that do IO using withContext
.
I'll take another look for LGTM when that's in!
app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/data/GardenPlantingRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/data/GardenPlantingRepository.kt
Outdated
Show resolved
Hide resolved
@objcode thx, I will update slightly later. |
…flower into feature/coroutines-app-executors
@objcode done |
app/src/main/java/com/google/samples/apps/sunflower/data/GardenPlantingRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/data/GardenPlantingRepository.kt
Outdated
Show resolved
Hide resolved
Coroutine style is +1! Thanks |
5d1f97f
to
076f51c
Compare
@tiembo done, reverted. |
Thank you @XinyueZ ! Added this PR to the Notable Community Contributions wiki page 👍 |
runOnIoThread()
, sorry @tiembo 😸 .