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

Start Flutter update

This commit is contained in:
2021-03-13 15:14:54 +01:00
parent fb80f3bd52
commit 819e2a7590
24 changed files with 140 additions and 189 deletions

View File

@ -41,7 +41,7 @@ abstract class BaseSerializationHelper<T extends SerializableElement> {
try {
final file = await _getFilePath();
if (!await file.exists()) return _cache = List();
if (!await file.exists()) return _cache = [];
final List<dynamic> json = jsonDecode(await file.readAsString());
_cache = json.cast<Map<String, dynamic>>().map(parse).toList();
@ -49,7 +49,7 @@ abstract class BaseSerializationHelper<T extends SerializableElement> {
_cache.sort();
} catch (e, s) {
print("Failed to read serialized data! $e => $s");
_cache = List();
_cache = [];
}
}

View File

@ -109,7 +109,7 @@ 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();
List<int> toDownload = [];
UsersList list = UsersList();
// Check cache