chore: Don't use dropdown if only one item (#5063)
This commit is contained in:
parent
92da1310b4
commit
04529b4898
1 changed files with 10 additions and 0 deletions
|
|
@ -214,6 +214,16 @@ class ChatDetailsButtonRowState extends State<ChatDetailsButtonRow> {
|
|||
return const SizedBox();
|
||||
}
|
||||
|
||||
if (otherButtons.length == 1) {
|
||||
return Expanded(
|
||||
child: RoomDetailsButton(
|
||||
mini: mini,
|
||||
buttonDetails: otherButtons.first,
|
||||
height: mini ? _miniButtonWidth : _buttonHeight,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Expanded(
|
||||
child: PopupMenuButton(
|
||||
useRootNavigator: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue