mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
use the main thread when deleting images from fullscreen view
This commit is contained in:
@ -174,14 +174,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
if (!isShowingPermDialog(file)) {
|
if (!isShowingPermDialog(file)) {
|
||||||
val document = getFileDocument(mPath, config.treeUri)
|
val document = getFileDocument(mPath, config.treeUri)
|
||||||
if (document.uri.toString().endsWith(file.absolutePath.getFilenameFromPath()) && !document.isDirectory)
|
if (document.uri.toString().endsWith(file.absolutePath.getFilenameFromPath()) && !document.isDirectory)
|
||||||
Thread({
|
|
||||||
document.delete()
|
document.delete()
|
||||||
}).start()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Thread({
|
|
||||||
file.delete()
|
file.delete()
|
||||||
}).start()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deleteFromMediaStore(file)) {
|
if (deleteFromMediaStore(file)) {
|
||||||
|
Reference in New Issue
Block a user