diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 9f6e83f2b..3bef8201c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -587,8 +587,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val currPath = getCurrentPath() SaveAsDialog(this, currPath, false) { handleSAFDialog(it) { + toast(R.string.saving) Thread { saveRotatedImageToFile(currPath, it, mRotationDegrees) { + toast(R.string.file_saved) mRotationDegrees = 0 invalidateOptionsMenu() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 571bfb9bf..b5c3bbb06 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -277,11 +277,19 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, callback: (() -> Unit)? = nu } fun BaseSimpleActivity.saveRotatedImageToFile(oldPath: String, newPath: String, degrees: Int, callback: () -> Unit) { - toast(R.string.saving) if (oldPath == newPath && oldPath.isJpg()) { if (tryRotateByExif(oldPath, degrees, callback)) { return @@ -406,7 +405,6 @@ fun BaseSimpleActivity.saveRotatedImageToFile(oldPath: String, newPath: String, copyFile(tmpPath, newPath) scanPathRecursively(newPath) - toast(R.string.file_saved) fileRotatedSuccessfully(newPath, oldLastModified) it.flush()