delete items from the main activity and viewpager activity on background threads

This commit is contained in:
tibbi 2017-11-22 00:01:07 +01:00
parent 07d921330e
commit aa2f8722ea
2 changed files with 2 additions and 2 deletions

View file

@ -208,7 +208,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
val newFolder = File(config.tempFolderPath)
if (newFolder.exists() && newFolder.isDirectory) {
if (newFolder.list()?.isEmpty() == true) {
deleteFileBg(newFolder, true)
deleteFile(newFolder, true)
}
}
config.tempFolderPath = ""

View file

@ -716,7 +716,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun deleteConfirmed() {
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
deleteFile(File(getCurrentMedia()[mPos].path)) {
reloadViewPager()
}
}