1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Can get a list of users with a throw strategy

This commit is contained in:
Pierre HUBERT 2019-06-15 08:16:18 +02:00
parent dd1a130436
commit d04334f7c9

View File

@ -63,6 +63,19 @@ class UsersHelper {
return list;
}
/// Get users information from a given [Set]. Throws an exception in case
/// of failure
Future<UsersList> getListWithThrow(Set<int> users,
{bool forceDownload = false}) async {
final list = await getUsersInfo(users.toList());
if (list == null)
throw Exception(
"Could not get information about the given list of users!");
return list;
}
/// Get users information from a given [Set]
Future<UsersList> getList(Set<int> users,
{bool forceDownload = false}) async {