chore: Don't use dropdown if only one item (#5063)

This commit is contained in:
ggurdin 2026-01-05 15:04:00 -05:00 committed by GitHub
parent 92da1310b4
commit 04529b4898
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,