fun bind(item: History.Metadata, isPendingDeletion: Boolean) { binding.historyLayout.isVisible = !isPendingDeletion binding.historyLayout.titleView.text = item.title binding.historyLayout.urlView.text = item.url binding.historyLayout.setSelectionInteractor(item, selectionHolder, interactor) binding.historyLayout.changeSelected(item in selectionHolder.selectedItems) if (this.item?.url != item.url) { binding.historyLayout.loadFavicon(item.url) } if (selectionHolder.selectedItems.isEmpty()) { binding.historyLayout.overflowView.showAndEnable() } else { binding.historyLayout.overflowView.hideAndDisable() } this.item = item }
Displays the data of the given history record.