delete items from the main activity and viewpager activity on background threads
This commit is contained in:
parent
07d921330e
commit
aa2f8722ea
2 changed files with 2 additions and 2 deletions
|
@ -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 = ""
|
||||
|
|
|
@ -716,7 +716,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun deleteConfirmed() {
|
||||
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
|
||||
deleteFile(File(getCurrentMedia()[mPos].path)) {
|
||||
reloadViewPager()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue