diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 373963ca..f22a534e 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -756,6 +756,9 @@ class ChatController extends State { if (choice == 'location') { sendLocationAction(); } + if (choice == 'videocall') { + startCallAction(); + } } void onInputBarChanged(String text) { diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index f2257097..d555be31 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -80,6 +80,18 @@ class ChatInputRow extends StatelessWidget { onSelected: controller.onAddPopupMenuButtonSelected, itemBuilder: (BuildContext context) => >[ + PopupMenuItem( + 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( value: 'file', child: ListTile( diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 8231e072..3b0bef1a 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -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), ];