From 0005fb7e0c9eed7c31d4bdc7e0e53c999a236168 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 6 Oct 2016 20:55:09 +0200 Subject: [PATCH] do not display an error toast if the user leaves the editor with Back --- .../simplemobiletools/gallery/activities/ViewPagerActivity.java | 2 -- .../com/simplemobiletools/gallery/activities/EditActivity.kt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java index d8e60af7f..9f24c9e88 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java @@ -189,8 +189,6 @@ public class ViewPagerActivity extends SimpleActivity if (resultCode == RESULT_OK && data != null) { final MyPagerAdapter adapter = (MyPagerAdapter) mPager.getAdapter(); adapter.updateItems(mPos); - } else { - Utils.showToast(getApplicationContext(), R.string.image_editing_failed); } } super.onActivityResult(requestCode, resultCode, data); 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 f43cb7515..0141d2f8e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -66,6 +66,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener setResult(Activity.RESULT_OK, intent) } catch (e: Exception) { Log.e(TAG, "Crop compressing failed $e") + toast(R.string.image_editing_failed) } finally { try { out?.close()