π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] restore memory lane rollout gate
Priyanshu Dangarea524f8d7def5
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 0789634ea9..5dff494a8a 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@@ -77,7 +77,8 @@ class MemoryLaneService {bool __isFeatureEnabled = false;// TODO: this should be removed, but flagService does not fire MLConsentChangedEvent on remote flags sync- bool get _isFeatureEnabled => hasGrantedMLConsent && __isFeatureEnabled;+ bool get isFeatureEnabled =>+ hasGrantedMLConsent && __isFeatureEnabled && flagService.facesTimeline;bool _initialized = false;Timer? _startupBackfillTimer;@@ -106,7 +107,7 @@ class MemoryLaneService {}Future<void> _queueFullRecompute({bool force = false}) async {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (!PersonService.isInitialized) {_logger.warning("Memory Lane full recompute skipped: PersonService not initialized",@@ -142,7 +143,7 @@ class MemoryLaneService {}Future<void> ensureTimelineReachability(String personId) async {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (personId.isEmpty) {return;}@@ -161,7 +162,7 @@ class MemoryLaneService {}Future<MemoryLanePersonTimeline?> getTimeline(String personId) async {- if (!_isFeatureEnabled) return null;+ if (!isFeatureEnabled) return null;final timeline = await _cacheService.getTimeline(personId);if (timeline == null || timeline.entries.isEmpty) {return timeline;@@ -197,7 +198,7 @@ class MemoryLaneService {}bool hasReadyTimelineSync(String personId) {- if (!_isFeatureEnabled) return false;+ if (!isFeatureEnabled) return false;return readyPersonIds.value.contains(personId);}@@ -237,7 +238,7 @@ class MemoryLaneService {}Future<void> _repairTimelineCropReadiness(String personId) async {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (!PersonService.isInitialized) {_logger.warning("Memory Lane crop readiness skipped for $personId: PersonService not initialized",@@ -286,7 +287,7 @@ class MemoryLaneService {}void _handlePeopleChange(PeopleChangedEvent event) {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (event.type == PeopleEventType.syncDone) {return;}@@ -385,7 +386,7 @@ class MemoryLaneService {}Future<void> _runStartupBackfill() async {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (!PersonService.isInitialized) {_logger.warning("Memory Lane startup diff skipped: PersonService not initialized",@@ -495,7 +496,7 @@ class MemoryLaneService {String personId, {required bool force,}) async {- if (!_isFeatureEnabled) return;+ if (!isFeatureEnabled) return;if (!PersonService.isInitialized) {_logger.warning("Memory Lane recompute skipped for $personId: PersonService not initialized",diff --git a/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart b/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dartindex 74ba59d469..315d42c2b6 100644--- a/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart@@ -110,7 +110,7 @@ class _MemoryLanePageState extends State<MemoryLanePage>_CaptionType _currentCaptionType = _CaptionType.yearsAgo;int _maxCaptionDigits = 1;bool get _showShareAction =>- hasGrantedMLConsent &&+ MemoryLaneService.instance.isFeatureEnabled &&flagService.enableMemoryShareLink &&!isLocalGalleryMode;@@ -122,7 +122,7 @@ class _MemoryLanePageState extends State<MemoryLanePage>..addListener(_onCardAnimationTick)..addStatusListener(_onCardAnimationStatusChanged);_stackProgressNotifier = ValueNotifier<double>(_stackProgress);- if (hasGrantedMLConsent) {+ if (MemoryLaneService.instance.isFeatureEnabled) {unawaited(_loadFrames());} else {_timelineUnavailable = true;@@ -599,7 +599,7 @@ class _MemoryLanePageState extends State<MemoryLanePage>@overrideWidget build(BuildContext context) {- if (!hasGrantedMLConsent) {+ if (!MemoryLaneService.instance.isFeatureEnabled) {final l10n = context.strings;final colorScheme = getEnteColorScheme(context);final textTheme = getEnteTextTheme(context);diff --git a/mobile/apps/photos/lib/ui/viewer/people/people_page.dart b/mobile/apps/photos/lib/ui/viewer/people/people_page.dartindex 8b024d195c..e8b27598c3 100644--- a/mobile/apps/photos/lib/ui/viewer/people/people_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/people/people_page.dart@@ -71,7 +71,8 @@ class _PeoplePageState extends State<PeoplePage> {bool _memoryLanePrewarmStarted = false;bool _isTryingToPopDeletedPersonPage = false;- bool get _memoryLaneEnabled => hasGrantedMLConsent;+ bool get _memoryLaneEnabled =>+ MemoryLaneService.instance.isFeatureEnabled;@overridevoid initState() {