Refactor(LibrariesScreen): Optimize prompts when there is no content or no content found

This commit is contained in:
2024-08-21 11:06:19 +08:00
parent 310214fc20
commit 0e5b6d7f98
3 changed files with 21 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.only
@@ -194,11 +195,25 @@ internal fun LibrariesScreen(
}
LibrariesScreenUiState.Nothing -> {
Text(text = "Nothing")
Column(
modifier = Modifier
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text(text = stringResource(R.string.core_nothing))
}
}
LibrariesScreenUiState.NotFound -> {
Text(text = "Not Found")
Column(
modifier = Modifier
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text(text = stringResource(R.string.core_nothing_found))
}
}
is LibrariesScreenUiState.Success -> {