removing the folder locking check from a few places to avoid duplication
This commit is contained in:
parent
8cf56dffad
commit
5ca662103b
|
@ -103,12 +103,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) {
|
||||
if (isFileTypeVisible(realPath)) {
|
||||
bottom_actions.beGone()
|
||||
handleLockedFolderOpening(realPath.getParentPath()) { success ->
|
||||
if (success) {
|
||||
sendViewPagerIntent(realPath)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
|
@ -120,27 +116,19 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
if (mUri!!.scheme == "file") {
|
||||
if (filename.contains('.')) {
|
||||
bottom_actions.beGone()
|
||||
handleLockedFolderOpening(mUri!!.path!!.getParentPath()) { success ->
|
||||
if (success) {
|
||||
rescanPaths(arrayListOf(mUri!!.path!!))
|
||||
sendViewPagerIntent(mUri!!.path!!)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
return
|
||||
} else {
|
||||
val path = applicationContext.getRealPathFromURI(mUri!!) ?: ""
|
||||
if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && getDoesFilePathExist(path)) {
|
||||
if (isFileTypeVisible(path)) {
|
||||
bottom_actions.beGone()
|
||||
handleLockedFolderOpening(path.getParentPath()) { success ->
|
||||
if (success) {
|
||||
rescanPaths(arrayListOf(mUri!!.path!!))
|
||||
sendViewPagerIntent(path)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue