chore: Move share icon in drawer to the header

This commit is contained in:
Christian Pauly 2022-08-14 15:58:32 +02:00
parent ed3112454b
commit bcbb6e1d76

View File

@ -25,6 +25,18 @@ class ChatListDrawer extends StatelessWidget {
backgroundImage: AssetImage('assets/logo.png'), backgroundImage: AssetImage('assets/logo.png'),
), ),
title: Text(AppConfig.applicationName), 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), const Divider(thickness: 1),
Expanded( Expanded(
@ -55,21 +67,6 @@ class ChatListDrawer extends StatelessWidget {
VRouter.of(context).to('/newspace'); 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( ListTile(
leading: Icon( leading: Icon(
Icons.settings_outlined, Icons.settings_outlined,