Improve source lang handling

This commit is contained in:
Syer10
2022-03-09 20:30:41 -05:00
parent cbdb504b19
commit 6b7492976d
4 changed files with 32 additions and 8 deletions

View File

@@ -19,7 +19,15 @@ data class Source(
val isNsfw: Boolean,
val displayName: String
) {
val displayLang: String
get() = if (id == LOCAL_SOURCE_ID) {
"other"
} else {
lang
}
companion object {
const val LOCAL_SOURCE_LANG = "localsourcelang"
const val LOCAL_SOURCE_ID = 0L
}
}