From 4ef159e9122cd2290029c905181eb49e321c35e1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 28 Oct 2020 21:01:51 +0100 Subject: [PATCH] rely on noMedia files from MediaStore on a couple more places --- app/build.gradle | 2 +- .../gallery/pro/activities/MainActivity.kt | 6 +++--- .../gallery/pro/adapters/DirectoryAdapter.kt | 10 +++++----- .../gallery/pro/extensions/Context.kt | 19 ++++++++++--------- .../gallery/pro/extensions/String.kt | 6 +++--- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0e1e1782d..0401e45ef 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,7 +77,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.31.8' + implementation 'com.simplemobiletools:commons:5.31.13' 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.19' 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 cadce60e4..ea9d72707 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 @@ -23,7 +23,6 @@ import androidx.recyclerview.widget.RecyclerView import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog -import com.simplemobiletools.commons.dialogs.NewAppsIconsDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.FileDirItem @@ -903,6 +902,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { val hiddenString = getString(R.string.hidden) val albumCovers = config.parseAlbumCovers() val includedFolders = config.includedFolders + val noMediaFolders = getNoMediaFoldersSync() val tempFolderPath = config.tempFolderPath val getProperFileSize = config.directorySorting and SORT_BY_SIZE != 0 val favoritePaths = getFavoritePaths() @@ -937,7 +937,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } directory } else { - createDirectoryFromMedia(directory.path, curMedia, albumCovers, hiddenString, includedFolders, getProperFileSize) + createDirectoryFromMedia(directory.path, curMedia, albumCovers, hiddenString, includedFolders, getProperFileSize, noMediaFolders) } // we are looping through the already displayed folders looking for changes, do not do anything if nothing changed @@ -1043,7 +1043,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } } - val newDir = createDirectoryFromMedia(folder, newMedia, albumCovers, hiddenString, includedFolders, getProperFileSize) + val newDir = createDirectoryFromMedia(folder, newMedia, albumCovers, hiddenString, includedFolders, getProperFileSize, noMediaFolders) dirs.add(newDir) setupAdapter(dirs) 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 75a7146d7..fbbbe7db0 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 @@ -305,7 +305,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList