|
@@ -213,6 +213,9 @@ class CollectionsService {
|
|
Uint8List getCollectionKey(int collectionID) {
|
|
Uint8List getCollectionKey(int collectionID) {
|
|
if (!_cachedKeys.containsKey(collectionID)) {
|
|
if (!_cachedKeys.containsKey(collectionID)) {
|
|
final collection = _collectionIDToCollections[collectionID];
|
|
final collection = _collectionIDToCollections[collectionID];
|
|
|
|
+ if (collection == null) {
|
|
|
|
+ throw AssertionError('collectionID $collectionID is not cached');
|
|
|
|
+ }
|
|
_cachedKeys[collectionID] = _getDecryptedKey(collection);
|
|
_cachedKeys[collectionID] = _getDecryptedKey(collection);
|
|
}
|
|
}
|
|
return _cachedKeys[collectionID];
|
|
return _cachedKeys[collectionID];
|
|
@@ -458,8 +461,6 @@ class CollectionsService {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
void _validateMoveRequest(
|
|
void _validateMoveRequest(
|
|
int toCollectionID, int fromCollectionID, List<File> files) {
|
|
int toCollectionID, int fromCollectionID, List<File> files) {
|
|
if (toCollectionID == fromCollectionID) {
|
|
if (toCollectionID == fromCollectionID) {
|