From 0048f9096bb0deb781dbd803ea4bd3e1692b4cc4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 9 Nov 2017 16:47:36 +0100 Subject: [PATCH] make sure we save the rotated image on the background thread --- .../gallery/activities/ViewPagerActivity.kt | 11 +++++------ 1 file changed, 5 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 e808a8441..595e76c55 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -495,13 +495,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun saveImageAs() { val currPath = getCurrentPath() SaveAsDialog(this, currPath, false) { - Thread({ - val selectedFile = File(it) - handleSAFDialog(selectedFile) { + val selectedFile = File(it) + handleSAFDialog(selectedFile) { + Thread({ saveImageToFile(currPath, it) - - } - }).start() + }).start() + } } }