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:
parent
dd1a130436
commit
d04334f7c9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user