From eb967709dddf052f166453588b37c45d1ae318b2 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Thu, 14 Aug 2025 08:53:38 +0530 Subject: [PATCH] Put vectorDB behind feature flag --- .../settings/backup/free_space_options.dart | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart b/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart index 9583d26193..95f61344b8 100644 --- a/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart +++ b/mobile/apps/photos/lib/ui/settings/backup/free_space_options.dart @@ -188,38 +188,41 @@ class _FreeUpSpaceOptionsScreenState extends State { const SizedBox( height: 24, ), - MenuItemWidget( - captionedTextWidget: - const CaptionedTextWidget( - title: - "Similar images", // TODO: lau: extract string + if (flagService.enableVectorDb) + MenuItemWidget( + captionedTextWidget: + const CaptionedTextWidget( + title: + "Similar images", // TODO: lau: extract string + ), + menuItemColor: colorScheme.fillFaint, + trailingWidget: Icon( + Icons.chevron_right_outlined, + color: colorScheme.strokeBase, + ), + singleBorderRadius: 8, + alignCaptionedTextToLeft: true, + trailingIconIsMuted: true, + showOnlyLoadingState: true, + onTap: () async { + await routeToPage( + context, + const SimilarImagesPage(), + ); + }, ), - menuItemColor: colorScheme.fillFaint, - trailingWidget: Icon( - Icons.chevron_right_outlined, - color: colorScheme.strokeBase, + if (flagService.enableVectorDb) + const Align( + alignment: Alignment.centerLeft, + child: MenuSectionDescriptionWidget( + content: + "Use AI to find images that look similar to each other.", // TODO: lau: extract string + ), ), - singleBorderRadius: 8, - alignCaptionedTextToLeft: true, - trailingIconIsMuted: true, - showOnlyLoadingState: true, - onTap: () async { - await routeToPage( - context, - const SimilarImagesPage(), - ); - }, - ), - const Align( - alignment: Alignment.centerLeft, - child: MenuSectionDescriptionWidget( - content: - "Use AI to find images that look similar to each other.", // TODO: lau: extract string + if (flagService.enableVectorDb) + const SizedBox( + height: 24, ), - ), - const SizedBox( - height: 24, - ), MenuItemWidget( captionedTextWidget: CaptionedTextWidget( title: S.of(context).viewLargeFiles,