feat: Regulate when thumbnails are animated as per MSC2705
This commit is contained in:
parent
76c890e7d0
commit
62ab031d13
6 changed files with 14 additions and 8 deletions
|
|
@ -81,8 +81,9 @@ class _ImageBubbleState extends State<ImageBubble> {
|
|||
|
||||
@override
|
||||
void initState() {
|
||||
thumbnailUrl = widget.event.getAttachmentUrl(getThumbnail: true);
|
||||
attachmentUrl = widget.event.getAttachmentUrl();
|
||||
thumbnailUrl =
|
||||
widget.event.getAttachmentUrl(getThumbnail: true, animated: true);
|
||||
attachmentUrl = widget.event.getAttachmentUrl(animated: true);
|
||||
if (thumbnailUrl == null) {
|
||||
_requestFile(getThumbnail: true);
|
||||
}
|
||||
|
|
@ -196,9 +197,11 @@ class _ImageBubbleState extends State<ImageBubble> {
|
|||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
thumbnailUrl = widget.event.getAttachmentUrl(
|
||||
getThumbnail: true, useThumbnailMxcUrl: true);
|
||||
attachmentUrl =
|
||||
widget.event.getAttachmentUrl(useThumbnailMxcUrl: true);
|
||||
getThumbnail: true,
|
||||
useThumbnailMxcUrl: true,
|
||||
animated: true);
|
||||
attachmentUrl = widget.event
|
||||
.getAttachmentUrl(useThumbnailMxcUrl: true, animated: true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue