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

Update conversations list screen

This commit is contained in:
2021-04-06 18:04:16 +02:00
parent 22f27a24de
commit 0fb83079a6
5 changed files with 68 additions and 17 deletions

View File

@ -1,6 +1,5 @@
import 'dart:collection';
import 'package:comunic/lists/users_list.dart';
import 'package:comunic/models/conversation.dart';
/// Conversations list
@ -9,7 +8,6 @@ import 'package:comunic/models/conversation.dart';
class ConversationsList extends ListBase<Conversation> {
final List<Conversation> _list = [];
UsersList users;
set length(l) => _list.length = l;
@ -27,4 +25,9 @@ class ConversationsList extends ListBase<Conversation> {
forEach((c) => c.members.forEach((member) => list.add(member.userID)));
return list;
}
/// Get the entire lists of groups ID in this list
Set<int> get allGroupsID => where((element) => element.isGroupConversation)
.map((e) => e.groupID)
.toSet();
}