update Commons to 2.39.9

This commit is contained in:
tibbi 2017-11-16 14:53:21 +01:00
parent 6f78a6e9ce
commit 1afddbc7bb
3 changed files with 5 additions and 11 deletions

View file

@ -47,7 +47,7 @@ ext {
} }
dependencies { dependencies {
compile 'com.simplemobiletools:commons:2.39.8' compile 'com.simplemobiletools:commons:2.39.9'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
compile 'com.android.support:multidex:1.0.2' compile 'com.android.support:multidex:1.0.2'

View file

@ -52,8 +52,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
val layoutType = if (isListViewType) R.layout.directory_item_list else R.layout.directory_item_grid val layoutType = if (isListViewType) R.layout.directory_item_list else R.layout.directory_item_grid
val view = activity.layoutInflater.inflate(layoutType, parent, false) return createViewHolder(layoutType, parent)
return createViewHolder(view)
} }
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) { override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
@ -61,9 +60,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
val view = holder.bindView(dir, !isPickIntent) { val view = holder.bindView(dir, !isPickIntent) {
setupView(it, dir) setupView(it, dir)
} }
itemViews.put(position, view) bindViewHolder(holder, position, view)
toggleItemSelection(selectedPositions.contains(position), position)
holder.itemView.tag = holder
} }
override fun getItemCount() = dirs.size override fun getItemCount() = dirs.size

View file

@ -52,8 +52,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
val layoutType = if (isListViewType) R.layout.photo_video_item_list else R.layout.photo_video_item_grid val layoutType = if (isListViewType) R.layout.photo_video_item_list else R.layout.photo_video_item_grid
val view = activity.layoutInflater.inflate(layoutType, parent, false) return createViewHolder(layoutType, parent)
return createViewHolder(view)
} }
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) { override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
@ -61,9 +60,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
val view = holder.bindView(medium, !allowMultiplePicks) { val view = holder.bindView(medium, !allowMultiplePicks) {
setupView(it, medium) setupView(it, medium)
} }
itemViews.put(position, view) bindViewHolder(holder, position, view)
toggleItemSelection(selectedPositions.contains(position), position)
holder.itemView.tag = holder
} }
override fun getItemCount() = media.size override fun getItemCount() = media.size