From ebd4b89f3447d163316f2909ae0bf6963d8685e2 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:36:06 +0530 Subject: [PATCH] [mob] Refactor --- mobile/lib/ui/viewer/people/cluster_app_bar.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mobile/lib/ui/viewer/people/cluster_app_bar.dart b/mobile/lib/ui/viewer/people/cluster_app_bar.dart index e4f43c69d4..86124d46a8 100644 --- a/mobile/lib/ui/viewer/people/cluster_app_bar.dart +++ b/mobile/lib/ui/viewer/people/cluster_app_bar.dart @@ -6,6 +6,7 @@ import 'package:logging/logging.dart'; import 'package:photos/core/configuration.dart'; import 'package:photos/core/event_bus.dart'; import "package:photos/db/files_db.dart"; +import 'package:photos/db/ml/base.dart'; import "package:photos/db/ml/db.dart"; import "package:photos/events/people_changed_event.dart"; import 'package:photos/events/subscription_purchased_event.dart'; @@ -35,8 +36,8 @@ class ClusterAppBar extends StatefulWidget { this.selectedFiles, this.clusterID, { this.person, - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _AppBarWidgetState(); @@ -58,6 +59,7 @@ class _AppBarWidgetState extends State { final GlobalKey shareButtonKey = GlobalKey(); bool isQuickLink = false; late GalleryType galleryType; + late final IMLDataDB mlDataDB = MLDataDB.instance; @override void initState() { @@ -199,10 +201,10 @@ class _AppBarWidgetState extends State { breakupResult.newFaceIdToCluster; // Update to delete the old clusters and save the new clusters - await MLDataDB.instance.deleteClusterSummary(widget.clusterID); + await mlDataDB.deleteClusterSummary(widget.clusterID); await MLDataDB.instance .clusterSummaryUpdate(breakupResult.newClusterSummaries); - await MLDataDB.instance.updateFaceIdToClusterId(newFaceIdToClusterID); + await mlDataDB.updateFaceIdToClusterId(newFaceIdToClusterID); // Find the biggest cluster biggestClusterID = '';