mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
removing a helper function related to moving path in recycle bin
This commit is contained in:
@@ -935,7 +935,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
|
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
|
||||||
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
||||||
if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
|
if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
|
||||||
movePathInRecycleBin(path) {
|
movePathsInRecycleBin(arrayListOf(path)) {
|
||||||
if (it) {
|
if (it) {
|
||||||
tryDeleteFileDirItem(fileDirItem, false, false) {
|
tryDeleteFileDirItem(fileDirItem, false, false) {
|
||||||
refreshViewPager()
|
refreshViewPager()
|
||||||
|
@@ -187,10 +187,6 @@ fun BaseSimpleActivity.tryDeleteFileDirItem(fileDirItem: FileDirItem, allowDelet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun BaseSimpleActivity.movePathInRecycleBin(path: String, callback: ((wasSuccess: Boolean) -> Unit)?) {
|
|
||||||
movePathsInRecycleBin(arrayListOf(path), callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList<String>, callback: ((wasSuccess: Boolean) -> Unit)?) {
|
fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList<String>, callback: ((wasSuccess: Boolean) -> Unit)?) {
|
||||||
Thread {
|
Thread {
|
||||||
var pathsCnt = paths.size
|
var pathsCnt = paths.size
|
||||||
|
Reference in New Issue
Block a user