diff --git a/app/src/main/java/eu/kanade/domain/source/model/Source.kt b/app/src/main/java/eu/kanade/domain/source/model/Source.kt index a698c07c0..0de7ed426 100644 --- a/app/src/main/java/eu/kanade/domain/source/model/Source.kt +++ b/app/src/main/java/eu/kanade/domain/source/model/Source.kt @@ -17,8 +17,11 @@ data class Source( val isUsedLast: Boolean = false, ) { - val nameWithLanguage: String - get() = "$name (${lang.uppercase()})" + val visualName: String + get() = when { + lang.isEmpty() -> name + else -> "$name (${lang.uppercase()})" + } val icon: ImageBitmap? get() { diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt index 9ae96a1fd..aeb210a83 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt @@ -20,8 +20,6 @@ import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.input.nestedscroll.nestedScroll @@ -218,7 +216,7 @@ fun SourceOptionsDialog( ) { AlertDialog( title = { - Text(text = source.nameWithLanguage) + Text(text = source.visualName) }, text = { Column { diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/database/components/ClearDatabaseItem.kt b/app/src/main/java/eu/kanade/presentation/more/settings/database/components/ClearDatabaseItem.kt index 084a9359f..5759dbee9 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/database/components/ClearDatabaseItem.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/database/components/ClearDatabaseItem.kt @@ -40,7 +40,7 @@ fun ClearDatabaseItem( .weight(1f), ) { Text( - text = source.nameWithLanguage, + text = source.visualName, style = MaterialTheme.typography.bodyMedium, ) Text(text = stringResource(id = R.string.clear_database_source_item_count, count))