Created
March 7, 2020 14:51
-
-
Save DawnImpulse/2d99249af579bb2fd40b7c86a3d48dd7 to your computer and use it in GitHub Desktop.
init mutable live data by lazy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val randomImages : MutableLiveData<List<ObjectImage>> by lazy { | |
MutableLiveData<List<ObjectImage>>().also { | |
GlobalScope.launch { | |
CtrlImage.random(limit) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment