From c4f49c56c9426a8bc094a126b21a31f65f03710a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 22 Jan 2017 17:44:27 +0100 Subject: [PATCH] use the main thread when deleting images from fullscreen view --- .../gallery/activities/ViewPagerActivity.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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)) {