do not allow long pressing search section titles

This commit is contained in:
tibbi 2019-03-27 18:01:08 +01:00
parent 151de355d2
commit 1a8db4def5

View file

@ -96,7 +96,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
}
}
override fun getSelectableItemCount() = listItems.size
override fun getSelectableItemCount() = listItems.filter { !it.isSectionTitle }.size
override fun getIsItemSelectable(position: Int) = !listItems[position].isSectionTitle
@ -119,7 +119,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
val fileDirItem = listItems[position]
holder.bindView(fileDirItem, true, true) { itemView, layoutPosition ->
holder.bindView(fileDirItem, !fileDirItem.isSectionTitle, !fileDirItem.isSectionTitle) { itemView, layoutPosition ->
setupView(itemView, fileDirItem)
}
bindViewHolder(holder)