From fe649e5a6264c6e55c82496ef60623bcd3d28bba Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 2 Oct 2020 11:24:19 +0200 Subject: [PATCH] fix: Invite left members --- lib/views/invitation_selection.dart | 10 ++++++---- lib/views/settings.dart | 12 ++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/views/invitation_selection.dart b/lib/views/invitation_selection.dart index e8fe112..d2776c7 100644 --- a/lib/views/invitation_selection.dart +++ b/lib/views/invitation_selection.dart @@ -98,11 +98,13 @@ class _InvitationSelectionState extends State { Profile.fromJson({'user_id': '@$text'}), ]); } + final participants = widget.room + .getParticipants() + .where((user) => + [Membership.join, Membership.invite].contains(user.membership)) + .toList(); foundProfiles.removeWhere((profile) => - widget.room - .getParticipants() - .indexWhere((u) => u.id == profile.userId) != - -1); + participants.indexWhere((u) => u.id == profile.userId) != -1); }); } diff --git a/lib/views/settings.dart b/lib/views/settings.dart index a8c9c8b..5dca9e8 100644 --- a/lib/views/settings.dart +++ b/lib/views/settings.dart @@ -550,12 +550,6 @@ class _SettingsState extends State { ListTile( trailing: Icon(Icons.link), title: Text(L10n.of(context).license), - onTap: () => launch( - 'https://gitlab.com/ChristianPauly/fluffychat-flutter/raw/master/LICENSE'), - ), - ListTile( - trailing: Icon(Icons.code), - title: Text(L10n.of(context).sourceCode), onTap: () => showLicensePage( context: context, applicationIcon: @@ -563,6 +557,12 @@ class _SettingsState extends State { applicationName: AppConfig.applicationName, ), ), + ListTile( + trailing: Icon(Icons.code), + title: Text(L10n.of(context).sourceCode), + onTap: () => launch( + 'https://gitlab.com/ChristianPauly/fluffychat-flutter'), + ), ], ), ),