For #1383: Fix updating description of close button on title change. (#6020)

nightly-build-test
Mihai Adrian 5 years ago committed by Jeff Boek
parent ef42d3e4dc
commit fbec001e28

@ -220,7 +220,9 @@ class SessionControlAdapter(
holder.play_pause_button.visibility = View.GONE
if (it.shouldUpdateHostname) { holder.updateHostname(it.tab.hostname) }
if (it.shouldUpdateTitle) { holder.updateTitle(it.tab.title) }
if (it.shouldUpdateTitle) {
holder.updateTitle(it.tab.title)
holder.updateCloseButtonDescription(it.tab.title) }
if (it.shouldUpdateFavicon) {
holder.updateFavIcon(it.tab.url, it.tab.icon)
}

@ -143,7 +143,7 @@ class TabViewHolder(
internal fun updateSelected(selected: Boolean) {
selected_border.visibility = if (selected) View.VISIBLE else View.GONE
}
private fun updateCloseButtonDescription(title: String) {
internal fun updateCloseButtonDescription(title: String) {
close_tab_button.contentDescription =
close_tab_button.context.getString(R.string.close_tab_title, title)
}

Loading…
Cancel
Save