Loading app/src/main/java/foundation/e/apps/ui/compose/components/SearchPlaceholder.kt +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ fun SearchPlaceholder(modifier: Modifier = Modifier) { ) { Image( painter = painterResource(id = R.drawable.ic_error_circular), contentDescription = stringResource(id = R.string.menu_search), contentDescription = stringResource(id = R.string.no_apps_found), contentScale = ContentScale.Fit, modifier = Modifier .padding(bottom = 4.dp) Loading app/src/main/java/foundation/e/apps/ui/compose/components/SearchResultsContent.kt +17 −3 Original line number Diff line number Diff line Loading @@ -79,11 +79,26 @@ fun SearchResultsContent( onPrivacyClick: (Application) -> Unit = {}, installButtonStateProvider: (Application) -> InstallButtonState, ) { when { tabs.isEmpty() || selectedTab !in tabs -> { if (tabs.isEmpty() || selectedTab !in tabs) { return } val fossEmpty = fossItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val pwaEmpty = pwaItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val playEmpty = playStoreItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val allSourcesEmpty = fossEmpty && pwaEmpty && playEmpty when { allSourcesEmpty -> { SearchPlaceholder(modifier = modifier.fillMaxSize()) } // Don't show tabs when a single source is checked in the Settings screen tabs.size == 1 -> { SearchTabPage( Loading @@ -101,7 +116,6 @@ fun SearchResultsContent( installButtonStateProvider = installButtonStateProvider, modifier = modifier.fillMaxSize(), ) return } else -> { Loading Loading
app/src/main/java/foundation/e/apps/ui/compose/components/SearchPlaceholder.kt +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ fun SearchPlaceholder(modifier: Modifier = Modifier) { ) { Image( painter = painterResource(id = R.drawable.ic_error_circular), contentDescription = stringResource(id = R.string.menu_search), contentDescription = stringResource(id = R.string.no_apps_found), contentScale = ContentScale.Fit, modifier = Modifier .padding(bottom = 4.dp) Loading
app/src/main/java/foundation/e/apps/ui/compose/components/SearchResultsContent.kt +17 −3 Original line number Diff line number Diff line Loading @@ -79,11 +79,26 @@ fun SearchResultsContent( onPrivacyClick: (Application) -> Unit = {}, installButtonStateProvider: (Application) -> InstallButtonState, ) { when { tabs.isEmpty() || selectedTab !in tabs -> { if (tabs.isEmpty() || selectedTab !in tabs) { return } val fossEmpty = fossItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val pwaEmpty = pwaItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val playEmpty = playStoreItems?.let { it.loadState.refresh is LoadState.NotLoading && it.itemCount == 0 } ?: true val allSourcesEmpty = fossEmpty && pwaEmpty && playEmpty when { allSourcesEmpty -> { SearchPlaceholder(modifier = modifier.fillMaxSize()) } // Don't show tabs when a single source is checked in the Settings screen tabs.size == 1 -> { SearchTabPage( Loading @@ -101,7 +116,6 @@ fun SearchResultsContent( installButtonStateProvider = installButtonStateProvider, modifier = modifier.fillMaxSize(), ) return } else -> { Loading