removing a helper function related to moving path in recycle bin

This commit is contained in:
tibbi 2018-07-01 23:37:49 +02:00
parent ce4f9b02b7
commit 348d5617e0
2 changed files with 1 additions and 5 deletions

View file

@ -935,7 +935,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
movePathInRecycleBin(path) {
movePathsInRecycleBin(arrayListOf(path)) {
if (it) {
tryDeleteFileDirItem(fileDirItem, false, false) {
refreshViewPager()

View file

@ -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)?) {
Thread {
var pathsCnt = paths.size