mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 23:22:01 +03:00
2d14d51ecb
Prior to #1912, height fix up of image events without an `info` in their content would fail, setting `style.height = null + "px"`. Now that all thumbnail sizing is done through one path, we can fix the same problem for all cases (images, stickers, e2e/non-e2e) by handling images without `info` correctly. At the bare minimum, we use a null-guard that will make sure an image without an `info` does not appear in the timeline (as a spinner or otherwise until loaded). When loaded, we size it like any other image by using the natural dimensions of the loaded image in place of `info`. Note that we do not apply the same logic to images that *do* specify an `info` with `w` and `h` keys. If the aspect ratio of the image does not match that of the event, we use the one in `info` even when the image has loaded. |
||
---|---|---|
.. | ||
DateSeparator.js | ||
MAudioBody.js | ||
MessageEvent.js | ||
MessageTimestamp.js | ||
MFileBody.js | ||
MImageBody.js | ||
MStickerBody.js | ||
MVideoBody.js | ||
RoomAvatarEvent.js | ||
SenderProfile.js | ||
TextualBody.js | ||
TextualEvent.js | ||
UnknownBody.js |