mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
removing the folder locking check from a few places to avoid duplication
This commit is contained in:
@ -103,12 +103,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||||||
if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) {
|
if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) {
|
||||||
if (isFileTypeVisible(realPath)) {
|
if (isFileTypeVisible(realPath)) {
|
||||||
bottom_actions.beGone()
|
bottom_actions.beGone()
|
||||||
handleLockedFolderOpening(realPath.getParentPath()) { success ->
|
|
||||||
if (success) {
|
|
||||||
sendViewPagerIntent(realPath)
|
sendViewPagerIntent(realPath)
|
||||||
}
|
|
||||||
finish()
|
finish()
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -120,27 +116,19 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||||||
if (mUri!!.scheme == "file") {
|
if (mUri!!.scheme == "file") {
|
||||||
if (filename.contains('.')) {
|
if (filename.contains('.')) {
|
||||||
bottom_actions.beGone()
|
bottom_actions.beGone()
|
||||||
handleLockedFolderOpening(mUri!!.path!!.getParentPath()) { success ->
|
|
||||||
if (success) {
|
|
||||||
rescanPaths(arrayListOf(mUri!!.path!!))
|
rescanPaths(arrayListOf(mUri!!.path!!))
|
||||||
sendViewPagerIntent(mUri!!.path!!)
|
sendViewPagerIntent(mUri!!.path!!)
|
||||||
}
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
||||||
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && getDoesFilePathExist(path)) {
|
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && getDoesFilePathExist(path)) {
|
||||||
if (isFileTypeVisible(path)) {
|
if (isFileTypeVisible(path)) {
|
||||||
bottom_actions.beGone()
|
bottom_actions.beGone()
|
||||||
handleLockedFolderOpening(path.getParentPath()) { success ->
|
|
||||||
if (success) {
|
|
||||||
rescanPaths(arrayListOf(mUri!!.path!!))
|
rescanPaths(arrayListOf(mUri!!.path!!))
|
||||||
sendViewPagerIntent(path)
|
sendViewPagerIntent(path)
|
||||||
}
|
|
||||||
finish()
|
finish()
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user