mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
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)
|
val newFolder = File(config.tempFolderPath)
|
||||||
if (newFolder.exists() && newFolder.isDirectory) {
|
if (newFolder.exists() && newFolder.isDirectory) {
|
||||||
if (newFolder.list()?.isEmpty() == true) {
|
if (newFolder.list()?.isEmpty() == true) {
|
||||||
deleteFileBg(newFolder, true)
|
deleteFile(newFolder, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.tempFolderPath = ""
|
config.tempFolderPath = ""
|
||||||
|
|
|
@ -716,7 +716,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteConfirmed() {
|
private fun deleteConfirmed() {
|
||||||
deleteFileBg(File(getCurrentMedia()[mPos].path)) {
|
deleteFile(File(getCurrentMedia()[mPos].path)) {
|
||||||
reloadViewPager()
|
reloadViewPager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue