mod: show reply gif emote

Closes #212

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-10 16:22:23 +08:00
parent f0a3515279
commit 52175b0b69
2 changed files with 7 additions and 2 deletions

View File

@@ -731,10 +731,13 @@ class ReplyItem extends StatelessWidget {
if (content.emote.containsKey(matchStr)) {
// 处理表情
final int size = content.emote[matchStr]['meta']['size'];
String imgUrl = content.emote[matchStr]['webp_url'] ??
content.emote[matchStr]['gif_url'] ??
content.emote[matchStr]['url'];
spanChildren.add(WidgetSpan(
child: ExcludeSemantics(
child: NetworkImgLayer(
src: content.emote[matchStr]['url'],
src: imgUrl,
type: 'emote',
width: size * 20,
height: size * 20,

View File

@@ -775,7 +775,9 @@ class ReplyItemGrpc extends StatelessWidget {
spanChildren.add(WidgetSpan(
child: ExcludeSemantics(
child: NetworkImgLayer(
src: content.emote[matchStr]!.url,
src: content.emote[matchStr]?.hasGifUrl() == true
? content.emote[matchStr]?.gifUrl
: content.emote[matchStr]?.url,
type: 'emote',
width: size * 20,
height: size * 20,