Created
June 26, 2021 08:06
-
-
Save orcchg/cbaa9dad8d6fb3e9e78b0bc9e728880d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| internal class StockListViewModel @Inject constructor( | |
| private val interactor: StockListInteractor | |
| ) : ViewModel() { | |
| private val _stocks by lazy { | |
| val data = MutableLiveData<List<Stock>>() | |
| interactor | |
| .stocks() | |
| .subscribe({ data.value = it }, Timber::e) | |
| data | |
| } | |
| internal val stocks: LiveData<List<Stock>> by lazy { _stocks } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment