π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] dont run _refreshReadyPersonIds() if did not actually revoke timeline
Priyanshu Dangarea935aae3d10f
diff --git a/mobile/apps/photos/lib/services/memory_lane/memory_lane_cache_service.dart b/mobile/apps/photos/lib/services/memory_lane/memory_lane_cache_service.dartindex ed4a16d412..3e4b52caf3 100644--- a/mobile/apps/photos/lib/services/memory_lane/memory_lane_cache_service.dart+++ b/mobile/apps/photos/lib/services/memory_lane/memory_lane_cache_service.dart@@ -119,16 +119,17 @@ class MemoryLaneCacheService {});}- Future<void> removeTimeline(String personId) async {+ Future<bool> removeTimeline(String personId) async {await _ensureInitialized();- await _lock.synchronized(() async {+ return await _lock.synchronized(() async {final currentCache = await _loadCacheUnsafe();if (!currentCache.timelines.containsKey(personId)) {- return;+ return false;}final updatedCache = currentCache.copyWithoutPerson(personId);_cache = updatedCache;await _writeCacheUnsafe();+ return true;});}diff --git a/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart b/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dartindex 0ae10e217d..b16fce927e 100644--- a/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart+++ b/mobile/apps/photos/lib/services/memory_lane/memory_lane_service.dart@@ -309,8 +309,10 @@ class MemoryLaneService {Future<void> _revokeTimeline(String id) async {_pendingRequests[id]?.isRevoked = true;- await _cacheService.removeTimeline(id);- await _refreshReadyPersonIds();+ final didRemove = await _cacheService.removeTimeline(id);+ if (didRemove) {+ await _refreshReadyPersonIds();+ }}void _handlePeopleChange(PeopleChangedEvent event) {