File tree Expand file tree Collapse file tree
feature/library/src/main/kotlin/com/ninecraft/booket/feature/library Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,10 @@ class LibraryPresenter @AssistedInject constructor(
114114 }
115115
116116 is LibraryUiEvent .OnFilterClick -> {
117+ if (currentFilter == event.filterOption) {
118+ return
119+ }
120+
117121 currentFilter = event.filterOption
118122 filterLibraryBooks(status = currentFilter.getApiValue(), page = START_INDEX , size = PAGE_SIZE )
119123 }
@@ -148,13 +152,11 @@ class LibraryPresenter @AssistedInject constructor(
148152 }
149153
150154 LaunchedEffect (Unit ) {
151- if (uiState == UiState .Idle || uiState is UiState .Error ) {
152- filterLibraryBooks(
153- status = currentFilter.getApiValue(),
154- page = START_INDEX ,
155- size = PAGE_SIZE ,
156- )
157- }
155+ filterLibraryBooks(
156+ status = currentFilter.getApiValue(),
157+ page = START_INDEX ,
158+ size = PAGE_SIZE ,
159+ )
158160 }
159161
160162 return LibraryUiState (
You can’t perform that action at this time.
0 commit comments