update commons to 3.0.9
This commit is contained in:
parent
04b219b308
commit
8fec0fa9ca
|
@ -46,7 +46,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.0.6'
|
||||
implementation 'com.simplemobiletools:commons:3.0.9'
|
||||
|
||||
implementation files('../libs/RootTools.jar')
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
lateinit private var fileDrawable: Drawable
|
||||
|
||||
init {
|
||||
selectableItemCount = fileDirItems.count()
|
||||
initDrawables()
|
||||
}
|
||||
|
||||
|
@ -82,6 +81,8 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
}
|
||||
}
|
||||
|
||||
override fun getSelectableItemCount() = fileDirItems.size
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int) = createViewHolder(R.layout.list_item, parent)
|
||||
|
||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||
|
@ -372,7 +373,6 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
|
||||
fun updateItems(newItems: MutableList<FileDirItem>) {
|
||||
fileDirItems = newItems
|
||||
selectableItemCount = fileDirItems.size
|
||||
notifyDataSetChanged()
|
||||
finishActMode()
|
||||
}
|
||||
|
|
|
@ -17,10 +17,6 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL
|
|||
|
||||
private val config = activity.config
|
||||
|
||||
init {
|
||||
selectableItemCount = favorites.size
|
||||
}
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_delete_only
|
||||
|
||||
override fun prepareActionMode(menu: Menu) {}
|
||||
|
@ -37,6 +33,8 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL
|
|||
}
|
||||
}
|
||||
|
||||
override fun getSelectableItemCount() = favorites.size
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int) = createViewHolder(R.layout.item_manage_favorite, parent)
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
|
|
Loading…
Reference in New Issue