π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: update ML service event handling and improve UI element dimensions
Prateek Sunalb8c7079c940b
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart b/mobile/apps/photos/lib/services/machine_learning/ml_service.dartindex c059512d37..48849d2b12 100644--- a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart+++ b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart@@ -70,31 +70,33 @@ class MLService {_logger.info("client: $client");// Listen on ComputeController- Bus.instance.on<ComputeControlEvent>().listen((event) {- if (!flagService.hasGrantedMLConsent) {- return;- }+ if (!isProcessBg) {+ Bus.instance.on<ComputeControlEvent>().listen((event) {+ if (!flagService.hasGrantedMLConsent) {+ return;+ }- _mlControllerStatus = event.shouldRun;- if (_mlControllerStatus) {- if (_shouldPauseIndexingAndClustering) {- _cancelPauseIndexingAndClustering();- _logger.info(- "MLController allowed running ML, faces indexing undoing previous pause",- );+ _mlControllerStatus = event.shouldRun;+ if (_mlControllerStatus) {+ if (_shouldPauseIndexingAndClustering) {+ _cancelPauseIndexingAndClustering();+ _logger.info(+ "MLController allowed running ML, faces indexing undoing previous pause",+ );+ } else {+ _logger.info(+ "MLController allowed running ML, faces indexing starting",+ );+ }+ unawaited(runAllML());} else {_logger.info(- "MLController allowed running ML, faces indexing starting",+ "MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)",);+ pauseIndexingAndClustering();}- unawaited(runAllML());- } else {- _logger.info(- "MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)",- );- pauseIndexingAndClustering();- }- });+ });+ }_isInitialized = true;_logger.info('init done');diff --git a/mobile/apps/photos/lib/ui/viewer/actions/smart_albums_status_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/smart_albums_status_widget.dartindex 63db239dc6..3ce25a884d 100644--- a/mobile/apps/photos/lib/ui/viewer/actions/smart_albums_status_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/actions/smart_albums_status_widget.dart@@ -1,4 +1,5 @@import "dart:async";+import "dart:ui";import 'package:flutter/material.dart';import "package:flutter_spinkit/flutter_spinkit.dart";@@ -66,7 +67,7 @@ class _SmartAlbumsStatusWidgetState extends State<SmartAlbumsStatusWidget>firstCurve: Curves.easeInOutExpo,secondCurve: Curves.easeInOutExpo,sizeCurve: Curves.easeInOutExpo,- crossFadeState: !(_syncingCollection == null ||+ crossFadeState: (_syncingCollection == null ||_syncingCollection!.$1 != widget.collection?.id)? CrossFadeState.showSecond: CrossFadeState.showFirst,@@ -80,9 +81,7 @@ class _SmartAlbumsStatusWidgetState extends State<SmartAlbumsStatusWidget>.copyWith(left: 14),decoration: BoxDecoration(borderRadius: BorderRadius.circular(8),- color: EnteTheme.isDark(context)- ? Colors.white.withOpacity(0.20)- : Colors.black.withOpacity(0.65),+ color: Colors.black.withOpacity(0.65),),child: Row(mainAxisSize: MainAxisSize.min,diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dartindex dcd184b9eb..9a999ad5d8 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart@@ -540,6 +540,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {(value?[widget.collection!.id]?.personIDs.isEmpty ?? true)? "assets/auto-add-people.png": "assets/edit-auto-add-people.png",+ width: 20,+ height: 20,color: EnteTheme.isDark(context) ? Colors.white : Colors.black,),),