There seems to be an issue with launchDataLoad -- if more than one function uses that and they both execute concurrently, then it seems that the spinner might be prematurely set to false. For example:
1) Call launchDataLoad with two functions, A, and B.
2) They both set the spinner to true.
3) A finishes first. The spinner is now set to false, even though B is still running.
Even if it won't happen with the specific example code, since the codelab talks about creating functions like this to generalize to any data loading, it may be worth mentioning or showing a way to handle that using coroutines.
There seems to be an issue with launchDataLoad -- if more than one function uses that and they both execute concurrently, then it seems that the spinner might be prematurely set to false. For example:
1) Call launchDataLoad with two functions, A, and B. 2) They both set the spinner to true. 3) A finishes first. The spinner is now set to false, even though B is still running.
Even if it won't happen with the specific example code, since the codelab talks about creating functions like this to generalize to any data loading, it may be worth mentioning or showing a way to handle that using coroutines.