File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
feature/library/src/main/kotlin/com/ninecraft/booket/feature/library Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11package com.ninecraft.booket.feature.library
22
33import androidx.compose.runtime.Composable
4+ import androidx.compose.runtime.LaunchedEffect
45import androidx.compose.runtime.getValue
56import androidx.compose.runtime.mutableIntStateOf
67import androidx.compose.runtime.mutableStateOf
@@ -127,6 +128,16 @@ class LibraryPresenter @AssistedInject constructor(
127128 }
128129 }
129130
131+ LaunchedEffect (Unit ) {
132+ if (uiState == UiState .Idle || uiState is UiState .Error ) {
133+ getLibraryBooks(
134+ status = currentFilter.getApiValue(),
135+ page = START_INDEX ,
136+ size = PAGE_SIZE
137+ )
138+ }
139+ }
140+
130141 return LibraryUiState (
131142 uiState = uiState,
132143 footerState = footerState,
You can’t perform that action at this time.
0 commit comments