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

Fix issue: when creating a comment on a list of posts where user never appeared before

This commit is contained in:
2020-04-16 08:34:39 +02:00
parent f0a23bcb47
commit cf5b1180a9
2 changed files with 31 additions and 18 deletions

View File

@ -31,6 +31,9 @@ class UsersList extends ListBase<User> {
throw "User not found in the list!";
}
/// Check if the user is included in this list or not
bool hasUser(int userID) => any((f) => f.id == userID);
/// Get the list of users ID present in this list
List<int> get usersID => List.generate(length, (i) => this[i].id);
}