1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Can respond to friendship requests from memberships bar

This commit is contained in:
2020-05-06 13:38:11 +02:00
parent c5c544fb34
commit 263849266f
3 changed files with 92 additions and 6 deletions

View File

@ -30,4 +30,8 @@ class MembershipList extends AbstractList<Membership> {
Set<int> get groupsId => where((f) => f.type == MembershipType.GROUP)
.map((f) => f.groupID)
.toSet();
/// Remove a friend membership from the list
void removeFriend(int friendID) => remove(firstWhere(
(f) => f.type == MembershipType.FRIEND && f.friend.id == friendID));
}