[v25.1] fix crash when glide fails to load avatar in ShareShortcutHelper (#4417)

🙄 
fixes #4416
This commit is contained in:
Konrad Pozniak 2024-05-04 18:36:39 +02:00 committed by GitHub
commit c10f82ffa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 9 deletions

View file

@ -8,7 +8,6 @@ import com.bumptech.glide.request.target.Target
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlinx.coroutines.suspendCancellableCoroutine
import okio.IOException
/**
* Allows waiting for a Glide request to complete without blocking a background thread.
@ -26,7 +25,7 @@ suspend fun <R> RequestBuilder<R>.submitAsync(
target: Target<R>,
isFirstResource: Boolean
): Boolean {
continuation.resumeWithException(e ?: IOException("Image loading failed"))
continuation.resumeWithException(e ?: GlideException("Image loading failed"))
return false
}