For #15089 - Disable recently closed in multiselect

pull/149/head
ekager 4 years ago
parent b5f1e772bd
commit f16ade33df

@ -98,10 +98,11 @@ class HistoryListItemViewHolder(
showTopContent: Boolean, showTopContent: Boolean,
isNormalMode: Boolean isNormalMode: Boolean
) { ) {
itemView.delete_button.isVisible = showTopContent
itemView.findViewById<ConstraintLayout>(R.id.recently_closed_nav).isVisible = showTopContent
if (showTopContent) { if (showTopContent) {
itemView.delete_button.run { itemView.delete_button.run {
visibility = View.VISIBLE
if (isNormalMode) { if (isNormalMode) {
isEnabled = true isEnabled = true
alpha = 1f alpha = 1f
@ -117,10 +118,15 @@ class HistoryListItemViewHolder(
R.string.recently_closed_tab else R.string.recently_closed_tabs R.string.recently_closed_tab else R.string.recently_closed_tabs
), numRecentTabs ), numRecentTabs
) )
itemView.findViewById<ConstraintLayout>(R.id.recently_closed_nav).isVisible = true itemView.findViewById<ConstraintLayout>(R.id.recently_closed_nav).run {
} else { if (isNormalMode) {
itemView.findViewById<ConstraintLayout>(R.id.recently_closed_nav).visibility = View.GONE isEnabled = true
itemView.delete_button.visibility = View.GONE alpha = 1f
} else {
isEnabled = false
alpha = DELETE_BUTTON_DISABLED_ALPHA
}
}
} }
} }

Loading…
Cancel
Save