diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 06d0a1108..26e0c0758 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -174,14 +174,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View if (!isShowingPermDialog(file)) { val document = getFileDocument(mPath, config.treeUri) if (document.uri.toString().endsWith(file.absolutePath.getFilenameFromPath()) && !document.isDirectory) - Thread({ - document.delete() - }).start() + document.delete() } } else { - Thread({ - file.delete() - }).start() + file.delete() } if (deleteFromMediaStore(file)) {