diff --git a/lib/models/irc.dart b/lib/models/irc.dart index fac3b0d3..6a1a2a49 100644 --- a/lib/models/irc.dart +++ b/lib/models/irc.dart @@ -391,7 +391,7 @@ class IRCMessage { _createEmoteSpan( emote: emote, height: emote.height != null ? emote.height! * emoteScale : emoteSize, - width: emote.width != null ? emote.width! * emoteScale : emoteSize, + width: emote.width != null ? emote.width! * emoteScale : null, ), ); } @@ -419,7 +419,7 @@ class IRCMessage { _createEmoteSpan( emote: emote, height: emote.height != null ? emote.height! * emoteScale : emoteSize, - width: emote.width != null ? emote.width! * emoteScale : emoteSize, + width: emote.width != null ? emote.width! * emoteScale : null, ), ); } else { @@ -525,7 +525,7 @@ class IRCMessage { static WidgetSpan _createEmoteSpan({ required Emote emote, required double height, - required double width, + required double? width, }) { const emoteType = [ 'Twitch (Bits Tier)', @@ -572,6 +572,7 @@ class IRCMessage { preferBelow: false, child: CachedNetworkImage( imageUrl: emote.url, + placeholder: (context, url) => const SizedBox(), fadeInDuration: const Duration(), height: height, width: width, diff --git a/lib/screens/channel/chat/emote_menu/emote_menu_section.dart b/lib/screens/channel/chat/emote_menu/emote_menu_section.dart index 3472bbce..23bf3018 100644 --- a/lib/screens/channel/chat/emote_menu/emote_menu_section.dart +++ b/lib/screens/channel/chat/emote_menu/emote_menu_section.dart @@ -46,7 +46,7 @@ class EmoteMenuSection extends StatelessWidget { child: CachedNetworkImage( imageUrl: emotes[index].url, height: emotes[index].height?.toDouble() ?? defaultEmoteSize, - width: emotes[index].width?.toDouble() ?? defaultEmoteSize, + width: emotes[index].width?.toDouble(), ), ), ), diff --git a/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart b/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart index a8d69c94..0397a26b 100644 --- a/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart +++ b/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart @@ -61,7 +61,7 @@ class RecentEmotesPanel extends StatelessWidget { color: matchingEmotes.isNotEmpty ? null : const Color.fromRGBO(255, 255, 255, 0.5), colorBlendMode: matchingEmotes.isNotEmpty ? null : BlendMode.modulate, height: emote.height?.toDouble() ?? defaultEmoteSize, - width: emote.width?.toDouble() ?? defaultEmoteSize, + width: emote.width?.toDouble(), ), ), ),