1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 06:53:23 +00:00
comunicmobile/lib/lists/call_members_list.dart

18 lines
557 B
Dart

import 'package:comunic/lists/abstract_list.dart';
import 'package:comunic/models/call_member.dart';
/// Call members list
///
/// @author Pierre Hubert
class CallMembersList extends AbstractList<CallMember> {
/// Get the IDs of the users in this list
Set<int> get usersID => this.map((f) => f.id).toSet();
/// Remove a specific member from this list
void removeUser(int userID) => this.removeWhere((f) => f.id == userID);
/// Get the connection of a specific user
CallMember getUser(int userID) => this.firstWhere((f) => f.id == userID);
}