This commit is contained in:
Neeraj Gupta
2025-02-14 09:32:30 +05:30
parent 5849d14cd9
commit b5a9bab5c6
2 changed files with 6 additions and 6 deletions

View File

@@ -225,8 +225,8 @@ class Collection {
return result;
}
static fromMap(Map<String, dynamic>? map) {
if (map == null) return null;
static Collection fromMap(Map<String, dynamic> map) {
final sharees = (map['sharees'] == null || map['sharees'].length == 0)
? <User>[]
: List<User>.from(map['sharees'].map((x) => User.fromMap(x)));

View File

@@ -1202,10 +1202,10 @@ class CollectionsService {
}
Future<Collection> _fromRemoteCollection(
Map<String, dynamic>? collectionData,
Map<String, dynamic> collectionData,
) async {
final Collection collection = Collection.fromMap(collectionData);
if (collectionData != null && !collection.isDeleted) {
if (!collection.isDeleted) {
final collectionKey =
_getAndCacheDecryptedKey(collection, source: "fetchDecryptMeta");
if (collectionData['magicMetadata'] != null) {
@@ -1900,9 +1900,9 @@ class CollectionsService {
String _decryptCollectionPath(Collection collection) {
final existingPath = collection.decryptedPath;
if (existingPath != null && existingPath!.isNotEmpty) {
if (existingPath != null && existingPath.isNotEmpty) {
debugPrint("Using cached decrypted path for collection ${collection.id}");
return existingPath!;
return existingPath;
} else {
debugPrint(
"Decrypting path for collection ${collection.id} from "