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

Get information about users & groups related to the notifications

This commit is contained in:
2019-11-01 15:37:27 +01:00
parent f0fdb3b378
commit 0b204afff9
3 changed files with 58 additions and 17 deletions

View File

@ -54,6 +54,17 @@ class GroupsHelper {
return list;
}
/// Get a list of groups from the server. In case of error, this method throws
/// an exception
Future<GroupsList> getListOrThrow(Set<int> groups,
{bool force = false}) async {
final list = await getList(groups, force: force);
if (list == null) throw Exception("Could not get the list of groups!");
return list;
}
/// Get a list of groups from the server
Future<GroupsList> getList(Set<int> groups, {bool force = false}) async {
final list = GroupsList();