Skip to content

Commit

Permalink
Fix crash for huge inline pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiritCroc committed Jun 16, 2022
1 parent 67daabd commit 11c9eb9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class EventHtmlRenderer @Inject constructor(
if (url.isMxcUrl()) {
val contentUrlResolver = activeSessionHolder.getActiveSession().contentUrlResolver()
val imageUrl = contentUrlResolver.resolveFullSize(url)
return Glide.with(context).load(imageUrl)
// Override size to avoid crashes for huge pictures
return Glide.with(context).load(imageUrl).override(500)
}
// We don't want to support other url schemes here, so just return a request for null
return Glide.with(context).load(null as String?)
Expand Down

0 comments on commit 11c9eb9

Please sign in to comment.