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

Can create conversations

This commit is contained in:
2021-03-13 10:32:11 +01:00
parent f54cc22fc6
commit ba60fa9e37
7 changed files with 91 additions and 124 deletions

View File

@ -56,6 +56,10 @@ class Conversation extends SerializableElement<Conversation> {
/// Get the list of members in the conversation
Set<int> get membersID => members.map((e) => e.userID).toSet();
/// Get the list of admins in the conversation
Set<int> get adminsID =>
members.where((e) => e.isAdmin).map((e) => e.userID).toSet();
/// Get the list of the OTHER members of the conversation (all except current user)
Set<int> get otherMembersID => membersID..remove(userID());

View File

@ -9,7 +9,7 @@ class NewConversation {
final List<int> members;
final bool follow;
final bool canEveryoneAddMembers;
final String color;
final Color color;
const NewConversation({
@required this.name,