From 5bca30b6341bf0889f3840f29b5740e13ce4acd5 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 6 Apr 2021 18:47:38 +0200 Subject: [PATCH] Add call button --- .../group_conversation_section.dart | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/ui/screens/group_sections/group_conversation_section.dart b/lib/ui/screens/group_sections/group_conversation_section.dart index d615f8b..6a902b1 100644 --- a/lib/ui/screens/group_sections/group_conversation_section.dart +++ b/lib/ui/screens/group_sections/group_conversation_section.dart @@ -25,10 +25,21 @@ class GroupConversationSection extends StatelessWidget { ), Positioned( right: 1.0, - child: IconButton( - icon: Icon(Icons.settings), - onPressed: () => MainController.of(context) - .openConversationSettingsRoute(conv), + child: Row( + children: [ + conv.callCapabilities != CallCapabilities.NONE + ? IconButton( + icon: Icon(Icons.phone), + onPressed: () => + MainController.of(context).startCall(conv.id), + ) + : Container(), + IconButton( + icon: Icon(Icons.settings), + onPressed: () => MainController.of(context) + .openConversationSettingsRoute(conv), + ), + ], ), ) ],