change: Move video call button to menu

This commit is contained in:
Krille Fear 2021-11-19 10:33:26 +01:00
parent b65f792817
commit 099f9cf881
3 changed files with 15 additions and 6 deletions

View File

@ -756,6 +756,9 @@ class ChatController extends State<Chat> {
if (choice == 'location') {
sendLocationAction();
}
if (choice == 'videocall') {
startCallAction();
}
}
void onInputBarChanged(String text) {

View File

@ -80,6 +80,18 @@ class ChatInputRow extends StatelessWidget {
onSelected: controller.onAddPopupMenuButtonSelected,
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'videocall',
child: ListTile(
leading: const CircleAvatar(
backgroundColor: Colors.blueGrey,
foregroundColor: Colors.white,
child: Icon(Icons.video_call_outlined),
),
title: Text(L10n.of(context).videoCall),
contentPadding: const EdgeInsets.all(0),
),
),
PopupMenuItem<String>(
value: 'file',
child: ListTile(

View File

@ -96,12 +96,6 @@ class ChatView extends StatelessWidget {
),
]
: [
if (controller.room.canSendDefaultStates)
IconButton(
tooltip: L10n.of(context).videoCall,
icon: const Icon(Icons.video_call_outlined),
onPressed: controller.startCallAction,
),
ChatSettingsPopupMenu(controller.room, !controller.room.isDirectChat),
];