Skip to content

Commit

Permalink
fix action button layout (#1635)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan01 authored Aug 7, 2024
1 parent 71f7ab0 commit 109d754
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/widgets/message/item/action/action_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class RenderActionButtonLayout extends RenderBox
final parentData = child.parentData! as _ParentData;

final size = child.getDryLayout(childConstraints);
final lastMaxRowHeight = maxRowHeight;
maxRowHeight = math.max(size.height, maxRowHeight);

parentData
Expand All @@ -245,7 +246,7 @@ class RenderActionButtonLayout extends RenderBox
rowItems = 6;
} else {
rowItems = 2;
height += maxRowHeight + verticalSpacing;
height += lastMaxRowHeight + verticalSpacing;
maxRowHeight = size.height;
row += 1;
parentData
Expand All @@ -257,7 +258,8 @@ class RenderActionButtonLayout extends RenderBox
rowItems += 6;
} else {
rowItems = 0;
height += maxRowHeight + verticalSpacing;
height += lastMaxRowHeight + verticalSpacing;
height += size.height + verticalSpacing;
maxRowHeight = 0;
parentData
.._row = row + 1
Expand Down

0 comments on commit 109d754

Please sign in to comment.