updating commons

This commit is contained in:
tibbi
2019-12-18 11:37:36 +01:00
parent 248ba75fd4
commit e18cce99a8
4 changed files with 11 additions and 3 deletions

View File

@ -117,6 +117,10 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
override fun getItemKeyPosition(key: Int) = listItems.indexOfFirst { it.path.hashCode() == key }
override fun onActionModeCreated() {}
override fun onActionModeDestroyed() {}
override fun getItemViewType(position: Int): Int {
return if (listItems[position].isSectionTitle) {
TYPE_SECTION

View File

@ -37,6 +37,10 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL
override fun getItemKeyPosition(key: Int) = favorites.indexOfFirst { it.hashCode() == key }
override fun onActionModeCreated() {}
override fun onActionModeDestroyed() {}
override fun prepareActionMode(menu: Menu) {}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_manage_favorite, parent)
@ -64,7 +68,7 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL
private fun removeSelection() {
val removeFavorites = ArrayList<String>(selectedKeys.size)
val positions = java.util.ArrayList<Int>()
val positions = ArrayList<Int>()
selectedKeys.forEach {
val key = it
val position = favorites.indexOfFirst { it.hashCode() == key }