diff --git a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/ItemRecyclers.kt b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/ItemRecyclers.kt index fd840284..1b81649f 100644 --- a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/ItemRecyclers.kt +++ b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/ItemRecyclers.kt @@ -101,13 +101,20 @@ fun VerticalItemList( .background(backgroundColor), contentAlignment = if (list.isNullOrEmpty()) Alignment.Center else Alignment.TopStart ) { - if (!list.isNullOrEmpty()) { - LazyColumn(verticalArrangement = spacedBy(4.dp)) { - items(items = list, key = itemKey, itemContent = itemContent) + when { + list == null -> Text( + text = stringResource(id = R.string.loading_list), + color = MaterialTheme.colorScheme.onBackground + ) + !list.isNullOrEmpty() -> { + LazyColumn(verticalArrangement = spacedBy(4.dp)) { + items(items = list, key = itemKey, itemContent = itemContent) + } } - } else Text( - text = stringResource(id = R.string.no_applications_available), - color = MaterialTheme.colorScheme.onBackground - ) + else -> Text( + text = stringResource(id = R.string.no_applications_available), + color = MaterialTheme.colorScheme.onBackground + ) + } } } \ No newline at end of file diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index ed683b12..17c9b14a 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -204,4 +204,5 @@ Remove from favorites Add to favorites Open + Loading list…