From f2151c15365f4a6f2c42696a6da8da9ac8b2d2cb Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 22 Jul 2018 23:32:14 +0200 Subject: [PATCH] rename shownBitmap to initialBitmap --- .../simplemobiletools/gallery/activities/EditActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 986bb3f71..5d2085950 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -73,7 +73,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener private var isCropIntent = false private var isEditingWithThirdParty = false - private var shownBitmap: Bitmap? = null + private var initialBitmap: Bitmap? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -128,8 +128,8 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean) = false - override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { - shownBitmap = resource + override fun onResourceReady(bitmap: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { + initialBitmap = bitmap return false } }).into(default_image_view) @@ -287,7 +287,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener val filterItems = filterThumbnailsManager.processThumbs() val adapter = FiltersAdapter(applicationContext, filterItems) { - val newBitmap = Bitmap.createBitmap(shownBitmap) + val newBitmap = Bitmap.createBitmap(initialBitmap) default_image_view.setImageBitmap(it.filter.processFilter(newBitmap)) }