mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
feat: Regulate when thumbnails are animated as per MSC2705
This commit is contained in:
parent
92684da3c3
commit
f5e11c2a21
@ -30,6 +30,7 @@ class ContentBanner extends StatelessWidget {
|
||||
width: bannerSize,
|
||||
height: bannerSize,
|
||||
method: ThumbnailMethod.scale,
|
||||
animated: true,
|
||||
);
|
||||
return Container(
|
||||
height: 300,
|
||||
|
@ -60,6 +60,7 @@ class HtmlMessage extends StatelessWidget {
|
||||
width: (width ?? 800) * ratio,
|
||||
height: (height ?? 800) * ratio,
|
||||
method: ThumbnailMethod.scale,
|
||||
animated: true,
|
||||
);
|
||||
},
|
||||
setCodeLanguage: (String key, String value) async {
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -147,6 +147,7 @@ class InputBar extends StatelessWidget {
|
||||
width: size * ratio,
|
||||
height: size * ratio,
|
||||
method: ThumbnailMethod.scale,
|
||||
animated: true,
|
||||
);
|
||||
return Container(
|
||||
padding: EdgeInsets.all(4.0),
|
||||
|
@ -1084,7 +1084,7 @@ class _ChatState extends State<_Chat> {
|
||||
Timer(Duration(seconds: 2), () {
|
||||
typingCoolDown = null;
|
||||
currentlyTyping = false;
|
||||
room.sendTypingInfo(false);
|
||||
room.sendTypingNotification(false);
|
||||
});
|
||||
typingTimeout ??=
|
||||
Timer(Duration(seconds: 30), () {
|
||||
@ -1093,7 +1093,7 @@ class _ChatState extends State<_Chat> {
|
||||
});
|
||||
if (!currentlyTyping) {
|
||||
currentlyTyping = true;
|
||||
room.sendTypingInfo(true,
|
||||
room.sendTypingNotification(true,
|
||||
timeout: Duration(seconds: 30)
|
||||
.inMilliseconds);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: bce0c1d4856030e31338ea96218e9d8f11645dfb
|
||||
resolved-ref: "03b9c6e2eec31c9645a0c7354fe90f8b1906efa8"
|
||||
url: "https://gitlab.com/famedly/famedlysdk.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user