Fix Clear Database item trying to display language when empty (#7651)
(cherry picked from commit 039fe4a618cd3029acebd10a0222affd9272a2a6) # Conflicts: # app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt
This commit is contained in:
parent
82a2eaa77a
commit
9fcf4bbc57
@ -22,8 +22,11 @@ data class Source(
|
|||||||
// SY <--
|
// SY <--
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val nameWithLanguage: String
|
val visualName: String
|
||||||
get() = "$name (${lang.uppercase()})"
|
get() = when {
|
||||||
|
lang.isEmpty() -> name
|
||||||
|
else -> "$name (${lang.uppercase()})"
|
||||||
|
}
|
||||||
|
|
||||||
val icon: ImageBitmap?
|
val icon: ImageBitmap?
|
||||||
get() {
|
get() {
|
||||||
|
@ -265,7 +265,7 @@ fun SourceOptionsDialog(
|
|||||||
) {
|
) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
title = {
|
title = {
|
||||||
Text(text = source.nameWithLanguage)
|
Text(text = source.visualName)
|
||||||
},
|
},
|
||||||
text = {
|
text = {
|
||||||
Column {
|
Column {
|
||||||
|
@ -40,7 +40,7 @@ fun ClearDatabaseItem(
|
|||||||
.weight(1f),
|
.weight(1f),
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = source.nameWithLanguage,
|
text = source.visualName,
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
)
|
)
|
||||||
Text(text = stringResource(id = R.string.clear_database_source_item_count, count))
|
Text(text = stringResource(id = R.string.clear_database_source_item_count, count))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user