mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-03-30 19:20:07 +02:00
Merge pull request #645 from Merkost/manage_speed_dial_selection
Manage speed dial long press disabled
This commit is contained in:
commit
59d5e92fcd
@ -47,6 +47,7 @@ class ContactsAdapter(
|
||||
highlightText: String = "",
|
||||
val showDeleteButton: Boolean = true,
|
||||
private val enableDrag: Boolean = false,
|
||||
private val allowLongClick: Boolean = true,
|
||||
itemClick: (Any) -> Unit
|
||||
) : MyRecyclerViewAdapter(activity, recyclerView, itemClick), ItemTouchHelperContract {
|
||||
|
||||
@ -127,7 +128,7 @@ class ContactsAdapter(
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val contact = contacts[position]
|
||||
holder.bindView(contact, true, true) { itemView, layoutPosition ->
|
||||
holder.bindView(contact, true, allowLongClick) { itemView, layoutPosition ->
|
||||
setupView(itemView, contact, holder)
|
||||
}
|
||||
bindViewHolder(holder)
|
||||
|
@ -33,7 +33,7 @@ class SelectContactDialog(val activity: SimpleActivity, contacts: MutableList<Co
|
||||
}
|
||||
})
|
||||
|
||||
select_contact_list.adapter = ContactsAdapter(activity, contacts, select_contact_list) {
|
||||
select_contact_list.adapter = ContactsAdapter(activity, contacts, select_contact_list, allowLongClick = false) {
|
||||
callback(it as Contact)
|
||||
dialog?.dismiss()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user