For #15796 - show device language under follow device language (#15966)

This commit is contained in:
Gabriel Luong 2020-10-16 12:47:56 -04:00 committed by GitHub
parent 7ba5e130ba
commit 412b412d5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class SystemLocaleViewHolder(
override fun bind(locale: Locale) {
locale_title_text.text = itemView.context.getString(R.string.default_locale_text)
locale_subtitle_text.visibility = View.GONE
locale_subtitle_text.text = locale.displayName.capitalize(Locale.getDefault())
locale_selected_icon.isVisible = isCurrentLocaleSelected(locale, isDefault = true)
itemView.setOnClickListener {
interactor.onDefaultLocaleSelected()

View File

@ -71,7 +71,7 @@ class LocaleViewHoldersTest {
systemLocaleViewHolder.bind(selectedLocale)
assertEquals("Follow device language", view.locale_title_text.text)
assertFalse(view.locale_subtitle_text.isVisible)
assertEquals("English (United States)", view.locale_subtitle_text.text)
assertTrue(view.locale_selected_icon.isVisible)
}