mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-19 06:48:00 +01:00
removing a helper function related to moving path in recycle bin
This commit is contained in:
parent
ce4f9b02b7
commit
348d5617e0
2 changed files with 1 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue