Skip to content

Commit

Permalink
fix: reaction not show because the width too big
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 4, 2023
1 parent 1775552 commit d339fc5
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions lib/pages/chat/events/message_reactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,26 @@ class _Reaction extends StatelessWidget {
final fontSize = DefaultTextStyle.of(context).style.fontSize;
Widget content;
if (reactionKey!.startsWith('mxc://')) {
content = Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MxcImage(
uri: Uri.parse(reactionKey!),
width: 9999,
height: fontSize,
),
const SizedBox(width: 4),
Text(
count.toString(),
style: TextStyle(
color: textColor,
fontSize: DefaultTextStyle.of(context).style.fontSize,
content = SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MxcImage(
uri: Uri.parse(reactionKey!),
width: fontSize == null ? 99.0 : fontSize * 2,
height: fontSize,
),
),
],
const SizedBox(width: 4),
Text(
count.toString(),
style: TextStyle(
color: textColor,
fontSize: DefaultTextStyle.of(context).style.fontSize,
),
),
],
),
);
} else {
var renderKey = Characters(reactionKey!);
Expand Down

0 comments on commit d339fc5

Please sign in to comment.