diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index 342699774..d9dfdf39e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -155,10 +155,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener private fun scanFinalPath(path: String) { scanPath(path) { setResult(Activity.RESULT_OK, intent) - runOnUiThread { - toast(R.string.file_saved) - } - + toast(R.string.file_saved) finish() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 804624b06..f76074a7a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -408,9 +408,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { val filtered = files.filter { it.exists() && it.isImageVideoGif() } as ArrayList deleteFiles(filtered) { if (!it) { - runOnUiThread { - toast(R.string.unknown_error_occurred) - } + toast(R.string.unknown_error_occurred) } else if (mMedia.isEmpty()) { finish() }