updating commons to 5.26.27
This commit is contained in:
parent
74cd554248
commit
18071f5fe8
4 changed files with 9 additions and 9 deletions
|
@ -78,7 +78,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.26.26'
|
||||
implementation 'com.simplemobiletools:commons:5.26.27'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -149,8 +149,8 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
}
|
||||
|
||||
private fun checkHideBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) {
|
||||
menu.findItem(R.id.cab_hide).isVisible = selectedPaths.any { !it.doesThisOrParentHaveNoMedia(activity) }
|
||||
menu.findItem(R.id.cab_unhide).isVisible = selectedPaths.any { it.doesThisOrParentHaveNoMedia(activity) }
|
||||
menu.findItem(R.id.cab_hide).isVisible = selectedPaths.any { !it.doesThisOrParentHaveNoMedia() }
|
||||
menu.findItem(R.id.cab_unhide).isVisible = selectedPaths.any { it.doesThisOrParentHaveNoMedia() }
|
||||
}
|
||||
|
||||
private fun checkPinBtnVisibility(menu: Menu, selectedPaths: ArrayList<String>) {
|
||||
|
@ -240,7 +240,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
val path = it
|
||||
activity.handleLockedFolderOpening(path) { success ->
|
||||
if (success) {
|
||||
if (path.containsNoMedia(activity)) {
|
||||
if (path.containsNoMedia()) {
|
||||
activity.removeNoMedia(path) {
|
||||
if (activity.config.shouldShowHidden) {
|
||||
updateFolderNames()
|
||||
|
@ -320,7 +320,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
val affectedPositions = ArrayList<Int>()
|
||||
val includedFolders = activity.config.includedFolders
|
||||
val newDirs = dirs.filterIndexed { index, directory ->
|
||||
val removeDir = directory.path.doesThisOrParentHaveNoMedia(activity) && !includedFolders.contains(directory.path)
|
||||
val removeDir = directory.path.doesThisOrParentHaveNoMedia() && !includedFolders.contains(directory.path)
|
||||
if (removeDir) {
|
||||
affectedPositions.add(index)
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ fun Context.storeDirectoryItems(items: ArrayList<Directory>) {
|
|||
|
||||
fun Context.checkAppendingHidden(path: String, hidden: String, includedFolders: MutableSet<String>): String {
|
||||
val dirName = getFolderNameFromPath(path)
|
||||
return if (path.doesThisOrParentHaveNoMedia(this) && !path.isThisOrParentIncluded(includedFolders)) {
|
||||
return if (path.doesThisOrParentHaveNoMedia() && !path.isThisOrParentIncluded(includedFolders)) {
|
||||
"$dirName $hidden"
|
||||
} else {
|
||||
dirName
|
||||
|
@ -534,7 +534,7 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly:
|
|||
|
||||
val hiddenString = resources.getString(R.string.hidden)
|
||||
filteredDirectories.forEach {
|
||||
it.name = if (it.path.doesThisOrParentHaveNoMedia(this) && !it.path.isThisOrParentIncluded(includedPaths)) {
|
||||
it.name = if (it.path.doesThisOrParentHaveNoMedia() && !it.path.isThisOrParentIncluded(includedPaths)) {
|
||||
"${it.name.removeSuffix(hiddenString).trim()} $hiddenString"
|
||||
} else {
|
||||
it.name.removeSuffix(hiddenString).trim()
|
||||
|
|
|
@ -36,7 +36,7 @@ fun String.shouldFolderBeVisible(excludedPaths: MutableSet<String>, includedPath
|
|||
val containsNoMedia = if (showHidden) {
|
||||
false
|
||||
} else {
|
||||
file.containsNoMedia(context)
|
||||
file.containsNoMedia()
|
||||
}
|
||||
|
||||
return if (!showHidden && containsNoMedia) {
|
||||
|
@ -50,7 +50,7 @@ fun String.shouldFolderBeVisible(excludedPaths: MutableSet<String>, includedPath
|
|||
} else if (!showHidden && file.isDirectory && file.canonicalFile == file.absoluteFile) {
|
||||
var containsNoMediaOrDot = containsNoMedia || contains("/.")
|
||||
if (!containsNoMediaOrDot) {
|
||||
containsNoMediaOrDot = file.doesParentHaveNoMedia(context)
|
||||
containsNoMediaOrDot = file.doesParentHaveNoMedia()
|
||||
}
|
||||
!containsNoMediaOrDot
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue