diff --git a/app/build.gradle b/app/build.gradle index d2b3fdb20..9f6e749bd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:99a97f2e16' + implementation 'com.github.SimpleMobileTools:Simple-Commons:94718a76cb' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index a04df1ac7..13983c47f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -1189,7 +1189,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { if (currAdapter == null || forceRecreate) { initZoomListener() val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller - DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) { + DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), directories_refresh_layout, fastscroller) { val clickedDir = it as Directory val path = clickedDir.path if (clickedDir.subfoldersCount == 1 || !config.groupDirectSubfolders) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index c7ea3253f..2974af647 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -14,6 +14,7 @@ import android.view.ViewGroup import android.widget.RelativeLayout import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.bumptech.glide.Glide import com.google.gson.Gson import com.simplemobiletools.commons.activities.BaseSimpleActivity @@ -54,7 +55,7 @@ import kotlin.collections.ArrayList import kotlin.collections.HashMap class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList, val listener: DirectoryOperationsListener?, recyclerView: MyRecyclerView, - val isPickIntent: Boolean, fastScroller: FastScroller? = null, itemClick: (Any) -> Unit) : + val isPickIntent: Boolean, val swipeRefreshLayout: SwipeRefreshLayout? = null, fastScroller: FastScroller? = null, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick), ItemTouchHelperContract { private val config = activity.config @@ -826,7 +827,11 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList