From 0118d372328b1ce7dbef67d69b0cafebb3edcc00 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Date: Mon, 11 Oct 2021 20:42:08 +0500 Subject: [PATCH] add members + remove members --- .../lib/views/group/group_view.dart | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/simplex_app/lib/views/group/group_view.dart b/packages/simplex_app/lib/views/group/group_view.dart index 5b5e8480b..7e4d329e7 100644 --- a/packages/simplex_app/lib/views/group/group_view.dart +++ b/packages/simplex_app/lib/views/group/group_view.dart @@ -19,7 +19,8 @@ class _GroupViewState extends State { bool _eraseMedia = false; final List _options = [ 'Add group', - 'Scan invitation', + 'Scan a Group', + 'Invitation', ]; List _groupList = []; @@ -147,13 +148,18 @@ class _GroupViewState extends State { style: const TextStyle( fontSize: 11, color: Colors.grey), ), - onTap: () => Navigator.push( - context, - MaterialPageRoute( - builder: (_) => ConversationView( - name: _groupList[index].groupName), - ), - ), + onTap: () async { + var value = await Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + ConversationView(group: _groupList[index]), + ), + ); + if (value) { + _getGroups(); + } + }, onLongPress: () => _conversationOptions(_groupList[index]), ), @@ -167,13 +173,15 @@ class _GroupViewState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), - offset: const Offset(-10, -120), + offset: const Offset(-10, -150), onSelected: (value) async { if (value == _options[0]) { var value = await Navigator.pushNamed(context, AppRoutes.addGroup); if (value == true) { _getGroups(); } + } else if (value == _options[1]) { + await Navigator.pushNamed(context, AppRoutes.addContact); } else { await Navigator.pushNamed(context, AppRoutes.scanInvitation); }