From c4ec6ebb3fe9dfeab1fe2bd85be0ec64b2b41aa6 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 14 Aug 2022 15:58:32 +0200 Subject: [PATCH] chore: Move share icon in drawer to the header --- lib/pages/chat_list/chat_list_drawer.dart | 27 ++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/pages/chat_list/chat_list_drawer.dart b/lib/pages/chat_list/chat_list_drawer.dart index 73242d4b8..a1c79b4fe 100644 --- a/lib/pages/chat_list/chat_list_drawer.dart +++ b/lib/pages/chat_list/chat_list_drawer.dart @@ -25,6 +25,18 @@ class ChatListDrawer extends StatelessWidget { backgroundImage: AssetImage('assets/logo.png'), ), title: Text(AppConfig.applicationName), + trailing: Icon( + Icons.adaptive.share_outlined, + color: Theme.of(context).colorScheme.onBackground, + ), + onTap: () { + Scaffold.of(context).closeDrawer(); + FluffyShare.share( + L10n.of(context)!.inviteText( + Matrix.of(context).client.userID!, + 'https://matrix.to/#/${Matrix.of(context).client.userID}?client=im.fluffychat'), + context); + }, ), const Divider(thickness: 1), Expanded( @@ -55,21 +67,6 @@ class ChatListDrawer extends StatelessWidget { VRouter.of(context).to('/newspace'); }, ), - ListTile( - leading: Icon( - Icons.adaptive.share_outlined, - color: Theme.of(context).colorScheme.onBackground, - ), - title: Text(L10n.of(context)!.inviteContact), - onTap: () { - Scaffold.of(context).closeDrawer(); - FluffyShare.share( - L10n.of(context)!.inviteText( - Matrix.of(context).client.userID!, - 'https://matrix.to/#/${Matrix.of(context).client.userID}?client=im.fluffychat'), - context); - }, - ), ListTile( leading: Icon( Icons.settings_outlined,