Skip to content

Commit

Permalink
fix(ui): fix attachment + link solution
Browse files Browse the repository at this point in the history
  • Loading branch information
imtoori committed Jun 27, 2022
1 parent aa971e1 commit 8056eb9
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ class _MessageCardState extends State<MessageCard> {
linksKey.currentContext?.findRenderObject() as RenderBox?;
final linkWidth = linkRenderBox?.size.width;

setState(() {
if (attachmentsWidth != null && linkWidth != null) {
widthLimit = max(attachmentsWidth, linkWidth);
} else {
widthLimit = attachmentsWidth ?? linkWidth;
}
});
if (mounted) {
setState(() {
if (attachmentsWidth != null && linkWidth != null) {
widthLimit = max(attachmentsWidth, linkWidth);
} else {
widthLimit = attachmentsWidth ?? linkWidth;
}
});
}
});
super.initState();
}
Expand Down

0 comments on commit 8056eb9

Please sign in to comment.