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() + } } }