For #22388 - Update content description of the delete button

upstream-sync
Mugurell 3 years ago committed by mergify[bot]
parent 57307794bd
commit c42ccb4966

@ -33,10 +33,13 @@ class HistoryListItemViewHolder(
historyInteractor.onRecentlyClosedClicked()
}
binding.historyLayout.overflowView.setImageResource(R.drawable.ic_close)
binding.historyLayout.overflowView.setOnClickListener {
val item = this.item ?: return@setOnClickListener
historyInteractor.onDeleteSome(setOf(item))
binding.historyLayout.overflowView.apply {
setImageResource(R.drawable.ic_close)
contentDescription = view.context.getString(R.string.history_delete_item)
setOnClickListener {
val item = item ?: return@setOnClickListener
historyInteractor.onDeleteSome(setOf(item))
}
}
}

@ -28,10 +28,13 @@ class HistoryMetadataGroupItemViewHolder(
private var item: History.Metadata? = null
init {
binding.historyLayout.overflowView.setImageResource(R.drawable.ic_close)
binding.historyLayout.overflowView.setOnClickListener {
val item = this.item ?: return@setOnClickListener
interactor.onDelete(setOf(item))
binding.historyLayout.overflowView.apply {
setImageResource(R.drawable.ic_close)
contentDescription = view.context.getString(R.string.history_delete_item)
setOnClickListener {
val item = item ?: return@setOnClickListener
interactor.onDelete(setOf(item))
}
}
}

@ -24,10 +24,13 @@ class RecentlyClosedItemViewHolder(
private var item: RecoverableTab? = null
init {
binding.historyLayout.overflowView.setImageResource(R.drawable.ic_close)
binding.historyLayout.overflowView.setOnClickListener {
val item = this.item ?: return@setOnClickListener
recentlyClosedFragmentInteractor.onDelete(item)
binding.historyLayout.overflowView.apply {
setImageResource(R.drawable.ic_close)
contentDescription = view.context.getString(R.string.history_delete_item)
setOnClickListener {
val item = item ?: return@setOnClickListener
recentlyClosedFragmentInteractor.onDelete(item)
}
}
}

@ -863,8 +863,8 @@
<string name="history_menu_open_in_new_tab_button" moz:removedIn="94" tools:ignore="UnusedResources">Open in new tab</string>
<!-- History overflow menu open in private tab button -->
<string name="history_menu_open_in_private_tab_button" moz:removedIn="94" tools:ignore="UnusedResources">Open in private tab</string>
<!-- Text for the button to delete a single history item -->
<string name="history_delete_item" moz:removedIn="94" tools:ignore="UnusedResources">Delete</string>
<!-- Context description text for the button to delete a single history item -->
<string name="history_delete_item">Delete</string>
<!-- History multi select title in app bar
The first parameter is the number of bookmarks selected -->
<string name="history_multi_select_title">%1$d selected</string>

Loading…
Cancel
Save