Fix default category showing up in edit manga categories list

Also remove some usages of runBlocking
This commit is contained in:
arkon
2022-08-07 11:00:51 -04:00
parent 3c2e237d63
commit 3bc6b1e202
8 changed files with 36 additions and 43 deletions

View File

@@ -8,13 +8,13 @@ import eu.kanade.tachiyomi.R
val Category.visualName: String
@Composable
get() = when (id) {
Category.UNCATEGORIZED_ID -> stringResource(id = R.string.label_default)
get() = when {
isSystemCategory -> stringResource(id = R.string.label_default)
else -> name
}
fun Category.visualName(context: Context): String =
when (id) {
Category.UNCATEGORIZED_ID -> context.getString(R.string.label_default)
when {
isSystemCategory -> context.getString(R.string.label_default)
else -> name
}