mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
catch and show exceptions thrown at Editor filtering
This commit is contained in:
parent
804eb08143
commit
8290f43282
1 changed files with 8 additions and 1 deletions
|
@ -583,7 +583,14 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
val thumbnailSize = resources.getDimension(R.dimen.bottom_filters_thumbnail_size).toInt()
|
val thumbnailSize = resources.getDimension(R.dimen.bottom_filters_thumbnail_size).toInt()
|
||||||
val bitmap = Glide.with(this)
|
val bitmap = Glide.with(this)
|
||||||
.asBitmap()
|
.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)
|
.submit(thumbnailSize, thumbnailSize)
|
||||||
.get()
|
.get()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue