[fenix] For https://github.com/mozilla-mobile/fenix/issues/22388 - Update content description of the delete button

pull/600/head
Mugurell 3 years ago committed by mergify[bot]
parent bbc2af95d7
commit 7c1b9b909f

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

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

@ -24,10 +24,13 @@ class RecentlyClosedItemViewHolder(
private var item: RecoverableTab? = null private var item: RecoverableTab? = null
init { init {
binding.historyLayout.overflowView.setImageResource(R.drawable.ic_close) binding.historyLayout.overflowView.apply {
binding.historyLayout.overflowView.setOnClickListener { setImageResource(R.drawable.ic_close)
val item = this.item ?: return@setOnClickListener contentDescription = view.context.getString(R.string.history_delete_item)
recentlyClosedFragmentInteractor.onDelete(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> <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 --> <!-- 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> <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 --> <!-- Context description text for the button to delete a single history item -->
<string name="history_delete_item" moz:removedIn="94" tools:ignore="UnusedResources">Delete</string> <string name="history_delete_item">Delete</string>
<!-- History multi select title in app bar <!-- History multi select title in app bar
The first parameter is the number of bookmarks selected --> The first parameter is the number of bookmarks selected -->
<string name="history_multi_select_title">%1$d selected</string> <string name="history_multi_select_title">%1$d selected</string>

Loading…
Cancel
Save