diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchRepository.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchRepository.kt index 6dab473b6..c7681cf5a 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchRepository.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchRepository.kt @@ -84,7 +84,6 @@ object SearchRepository { val sections = results .mapNotNull { it.getOrNull() } - .sortedBy { it.title.lowercase() } val firstFailure = results.firstNotNullOfOrNull { it.exceptionOrNull()?.message } val allFailed = results.isNotEmpty() && results.all { it.isFailure } @@ -138,7 +137,7 @@ object SearchRepository { } val current = _discoverUiState.value - val typeOptions = sources.map { it.type }.distinct().sortedBy { it.typeSortKey() } + val typeOptions = sources.map { it.type }.distinct() val selectedType = current.selectedType ?.takeIf { type -> typeOptions.contains(type) } ?: typeOptions.first() @@ -279,9 +278,7 @@ object SearchRepository { supportsPagination = catalog.supportsPagination(), ) } - }.sortedWith( - compareBy({ it.type.typeSortKey() }, { it.addonName.lowercase() }, { it.catalogName.lowercase() }), - ) + } private suspend fun SearchCatalogRequest.toSection(): HomeCatalogSection { val manifest = requireNotNull(addon.manifest) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchScreen.kt index fecf872be..b099adf35 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/search/SearchScreen.kt @@ -140,6 +140,7 @@ fun SearchScreen( placeholder = "Search movies, shows...", ) } + androidx.compose.foundation.layout.Spacer(modifier = Modifier.height(14.dp)) } }