File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
sample-compose/app/src/main/java/co/nimblehq/sample/compose/ui/screens/home
template-compose/app/src/main/java/co/nimblehq/template/compose/ui/screens/home Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ class HomeViewModel @Inject constructor(
22
22
) : BaseViewModel() {
23
23
24
24
private val _uiModels = MutableStateFlow <List <UiModel >>(emptyList())
25
- val uiModels: StateFlow < List < UiModel >> = _uiModels
25
+ val uiModels = _uiModels .asStateFlow()
26
26
27
27
private val _isFirstTimeLaunch = MutableStateFlow (false )
28
- val isFirstTimeLaunch: StateFlow < Boolean > = _isFirstTimeLaunch
28
+ val isFirstTimeLaunch = _isFirstTimeLaunch .asStateFlow()
29
29
30
30
init {
31
31
getModelsUseCase()
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class HomeViewModel @Inject constructor(
17
17
) : BaseViewModel() {
18
18
19
19
private val _uiModels = MutableStateFlow <List <UiModel >>(emptyList())
20
- val uiModels: StateFlow < List < UiModel >> = _uiModels
20
+ val uiModels = _uiModels .asStateFlow()
21
21
22
22
init {
23
23
useCase()
You can’t perform that action at this time.
0 commit comments