mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-19 17:35:18 +00:00
chore: Move share icon in drawer to the header
This commit is contained in:
parent
1d4dc3e77b
commit
c4ec6ebb3f
1 changed files with 12 additions and 15 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue