|
|
|
@ -28,12 +28,15 @@ 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
|
|
|
|
|
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))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun bind(item: History.Metadata) {
|
|
|
|
|
binding.historyLayout.titleView.text = item.title
|
|
|
|
|