mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
catch and show exceptions thrown at Editor filtering
This commit is contained in:
@ -583,7 +583,14 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||
val thumbnailSize = resources.getDimension(R.dimen.bottom_filters_thumbnail_size).toInt()
|
||||
val bitmap = Glide.with(this)
|
||||
.asBitmap()
|
||||
.load(uri)
|
||||
.load(uri).listener(object : RequestListener<Bitmap> {
|
||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean): Boolean {
|
||||
showErrorToast(e.toString())
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target<Bitmap>?, dataSource: DataSource?, isFirstResource: Boolean) = false
|
||||
})
|
||||
.submit(thumbnailSize, thumbnailSize)
|
||||
.get()
|
||||
|
||||
|
Reference in New Issue
Block a user