From 1afddbc7bbd1527b1e50b03a2ea2340f483b05d2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 16 Nov 2017 14:53:21 +0100 Subject: [PATCH] update Commons to 2.39.9 --- app/build.gradle | 2 +- .../simplemobiletools/gallery/adapters/DirectoryAdapter.kt | 7 ++----- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 7 ++----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 80fe23f3e..1e3496d73 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } 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.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.android.support:multidex:1.0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 6e1ffed01..45ef0b575 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -52,8 +52,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList, 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 view = activity.layoutInflater.inflate(layoutType, parent, false) - return createViewHolder(view) + return createViewHolder(layoutType, parent) } override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) { @@ -61,9 +60,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, val view = holder.bindView(medium, !allowMultiplePicks) { setupView(it, medium) } - itemViews.put(position, view) - toggleItemSelection(selectedPositions.contains(position), position) - holder.itemView.tag = holder + bindViewHolder(holder, position, view) } override fun getItemCount() = media.size