|
@@ -5,7 +5,9 @@ import androidx.compose.foundation.layout.Arrangement
|
|
|
import androidx.compose.foundation.layout.Box
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
import androidx.compose.foundation.layout.Row
|
|
|
+import androidx.compose.foundation.layout.Spacer
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
+import androidx.compose.foundation.layout.height
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
import androidx.compose.foundation.layout.size
|
|
|
import androidx.compose.material.icons.Icons
|
|
@@ -20,6 +22,7 @@ import androidx.compose.runtime.Composable
|
|
|
import androidx.compose.ui.Alignment
|
|
|
import androidx.compose.ui.Modifier
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
+import androidx.compose.ui.text.style.TextAlign
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
import eu.kanade.presentation.util.padding
|
|
|
import eu.kanade.tachiyomi.R
|
|
@@ -61,7 +64,7 @@ fun GlobalSearchResultItem(
|
|
|
@Composable
|
|
|
fun GlobalSearchEmptyResultItem() {
|
|
|
Text(
|
|
|
- text = stringResource(id = R.string.no_results_found),
|
|
|
+ text = stringResource(R.string.no_results_found),
|
|
|
modifier = Modifier
|
|
|
.padding(
|
|
|
horizontal = MaterialTheme.padding.medium,
|
|
@@ -90,12 +93,19 @@ fun GlobalSearchLoadingResultItem() {
|
|
|
fun GlobalSearchErrorResultItem(message: String?) {
|
|
|
Column(
|
|
|
modifier = Modifier
|
|
|
- .padding(vertical = MaterialTheme.padding.medium)
|
|
|
+ .padding(
|
|
|
+ horizontal = MaterialTheme.padding.medium,
|
|
|
+ vertical = MaterialTheme.padding.small,
|
|
|
+ )
|
|
|
.fillMaxWidth(),
|
|
|
horizontalAlignment = Alignment.CenterHorizontally,
|
|
|
verticalArrangement = Arrangement.Center,
|
|
|
) {
|
|
|
Icon(imageVector = Icons.Outlined.Error, contentDescription = null)
|
|
|
- Text(text = message ?: stringResource(id = R.string.unknown_error))
|
|
|
+ Spacer(Modifier.height(4.dp))
|
|
|
+ Text(
|
|
|
+ text = message ?: stringResource(R.string.unknown_error),
|
|
|
+ textAlign = TextAlign.Center,
|
|
|
+ )
|
|
|
}
|
|
|
}
|