Only show invite button when possible

This commit is contained in:
Christian Pauly 2020-01-03 12:07:04 +01:00
parent 5a9d4b3d7f
commit 4dd31d961a
1 changed files with 12 additions and 10 deletions

View File

@ -141,16 +141,18 @@ class _ChatDetailsState extends State<ChatDetails> {
),
],
),
ListTile(
title: Text("Invite contact"),
leading: Icon(Icons.add),
onTap: () => Navigator.of(context).push(
AppRoute.defaultRoute(
context,
InvitationSelection(widget.room),
),
),
),
widget.room.canInvite
? ListTile(
title: Text("Invite contact"),
leading: Icon(Icons.add),
onTap: () => Navigator.of(context).push(
AppRoute.defaultRoute(
context,
InvitationSelection(widget.room),
),
),
)
: Container(),
],
)
: i < members.length + 1