mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Start Flutter update
This commit is contained in:
@ -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 = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user