1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00

Provide user credentials when signing in

This commit is contained in:
Pierre HUBERT 2019-05-18 16:37:46 +02:00
parent 9d5762ecfd
commit 55088f2b23

View File

@ -20,7 +20,9 @@ class UsersHelper {
Future<UsersList> _downloadInfo(List<int> users) async {
// Execute the request
final response = await APIRequest(
uri: "user/getInfoMultiple", args: {"usersID": users.join(",")}).exec();
uri: "user/getInfoMultiple",
needLogin: true,
args: {"usersID": users.join(",")}).exec();
// Check if the request did not execute correctly
if (response.code != 200) return null;
@ -63,7 +65,6 @@ class UsersHelper {
/// the server, otherwise cached data will be used if available
Future<UsersList> getUsersInfo(List<int> users,
{bool forceDownload = false}) async {
List<int> toDownload = List();
UsersList list = UsersList();
@ -79,8 +80,7 @@ class UsersHelper {
if (toDownload.length > 0) {
final downloadedList = await _downloadInfo(toDownload);
if(downloadedList == null)
return null;
if (downloadedList == null) return null;
list.addAll(downloadedList);
}