update commons to 3.0.9
This commit is contained in:
parent
b5b3648602
commit
d595c590f0
|
@ -47,7 +47,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.0.6'
|
||||
implementation 'com.simplemobiletools:commons:3.0.9'
|
||||
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.8.0'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||
implementation 'com.android.support:multidex:1.0.2'
|
||||
|
|
|
@ -35,10 +35,6 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
|
|||
private var animateGifs = config.animateGifs
|
||||
private var cropThumbnails = config.cropThumbnails
|
||||
|
||||
init {
|
||||
selectableItemCount = dirs.count()
|
||||
}
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_directories
|
||||
|
||||
override fun prepareItemSelection(view: View) {
|
||||
|
@ -92,6 +88,8 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
}
|
||||
|
||||
override fun getSelectableItemCount() = dirs.size
|
||||
|
||||
override fun onViewRecycled(holder: ViewHolder?) {
|
||||
super.onViewRecycled(holder)
|
||||
if (!activity.isActivityDestroyed()) {
|
||||
|
@ -305,7 +303,6 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
|
|||
|
||||
fun updateDirs(newDirs: ArrayList<Directory>) {
|
||||
dirs = newDirs
|
||||
selectableItemCount = dirs.size
|
||||
notifyDataSetChanged()
|
||||
finishActMode()
|
||||
}
|
||||
|
|
|
@ -18,10 +18,6 @@ class ManageFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList<
|
|||
|
||||
private val config = activity.config
|
||||
|
||||
init {
|
||||
selectableItemCount = folders.size
|
||||
}
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_delete_only
|
||||
|
||||
override fun prepareActionMode(menu: Menu) {}
|
||||
|
@ -38,6 +34,8 @@ class ManageFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList<
|
|||
}
|
||||
}
|
||||
|
||||
override fun getSelectableItemCount() = folders.size
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int) = createViewHolder(R.layout.item_manage_folder, parent)
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
|
|
|
@ -35,10 +35,6 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||
private var cropThumbnails = config.cropThumbnails
|
||||
private var displayFilenames = config.displayFileNames
|
||||
|
||||
init {
|
||||
selectableItemCount = media.count()
|
||||
}
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_media
|
||||
|
||||
override fun prepareItemSelection(view: View) {
|
||||
|
@ -92,6 +88,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
}
|
||||
|
||||
override fun getSelectableItemCount() = media.size
|
||||
|
||||
override fun onViewRecycled(holder: ViewHolder?) {
|
||||
super.onViewRecycled(holder)
|
||||
if (!activity.isActivityDestroyed()) {
|
||||
|
@ -233,7 +231,6 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||
|
||||
fun updateMedia(newMedia: ArrayList<Medium>) {
|
||||
media = newMedia
|
||||
selectableItemCount = media.size
|
||||
notifyDataSetChanged()
|
||||
finishActMode()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue