mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 03:55:06 +01:00
use better kotlin syntactic sugar
This commit is contained in:
parent
f61f0305a9
commit
47c78fb62f
@ -18,8 +18,7 @@ object LocaleHelper {
|
|||||||
return when (lang) {
|
return when (lang) {
|
||||||
SourcePresenter.LAST_USED_KEY -> context.getString(R.string.last_used_source)
|
SourcePresenter.LAST_USED_KEY -> context.getString(R.string.last_used_source)
|
||||||
SourcePresenter.PINNED_KEY -> context.getString(R.string.pinned_sources)
|
SourcePresenter.PINNED_KEY -> context.getString(R.string.pinned_sources)
|
||||||
"" -> context.getString(R.string.other_source)
|
"","other" -> context.getString(R.string.other_source)
|
||||||
"other" -> context.getString(R.string.other_source)
|
|
||||||
"all" -> context.getString(R.string.all_lang)
|
"all" -> context.getString(R.string.all_lang)
|
||||||
else -> getDisplayName(lang)
|
else -> getDisplayName(lang)
|
||||||
}
|
}
|
||||||
@ -34,7 +33,6 @@ object LocaleHelper {
|
|||||||
if (lang == null) {
|
if (lang == null) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
val locale = if (lang.isEmpty()) {
|
val locale = if (lang.isEmpty()) {
|
||||||
LocaleListCompat.getAdjustedDefault()[0]
|
LocaleListCompat.getAdjustedDefault()[0]
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user