Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: always update entity, even when deselected all

Prateek Sunal5fc793ea61f5
diff --git a/mobile/apps/photos/lib/services/smart_albums_service.dart b/mobile/apps/photos/lib/services/smart_albums_service.dart
index b67e95bbae..a967dbd618 100644
--- a/mobile/apps/photos/lib/services/smart_albums_service.dart
+++ b/mobile/apps/photos/lib/services/smart_albums_service.dart
@@ -221,21 +221,13 @@ class SmartAlbumsService {
Future<void> saveConfig(SmartAlbumConfig config) async {
final userId = Configuration.instance.getUserID()!;
- if (config.personIDs.isNotEmpty) {
- await _addOrUpdateEntity(
- EntityType.smartAlbum,
- config.toJson(),
- collectionId: config.collectionId,
- addWithCustomID: config.id == null,
- userId: userId,
- );
- } else {
- // Delete the config when no people are selected
- await _deleteEntry(
- userId: userId,
- collectionId: config.collectionId,
- );
- }
+ await _addOrUpdateEntity(
+ EntityType.smartAlbum,
+ config.toJson(),
+ collectionId: config.collectionId,
+ addWithCustomID: config.id == null,
+ userId: userId,
+ );
}
Future<SmartAlbumConfig?> getConfig(int collectionId) async {