group LocalSource and Other lang source together

This commit is contained in:
curche 2021-10-04 00:59:03 +05:30
parent c6d4e4c15f
commit f61f0305a9

View File

@ -16,9 +16,10 @@ object LocaleHelper {
*/ */
fun getSourceDisplayName(lang: String?, context: Context): String { fun getSourceDisplayName(lang: String?, context: Context): String {
return when (lang) { return when (lang) {
"" -> context.getString(R.string.other_source)
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)
"all" -> context.getString(R.string.all_lang) "all" -> context.getString(R.string.all_lang)
else -> getDisplayName(lang) else -> getDisplayName(lang)
} }