Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Debug option

laurenspriemabd0dedc5759
diff --git a/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart
index 19a90ead9b..4aa0d85224 100644
--- a/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart
+++ b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart
@@ -348,7 +348,22 @@ class _MLDebugSectionWidgetState extends State<MLDebugSectionWidget> {
trailingIcon: Icons.chevron_right_outlined,
trailingIconIsMuted: true,
onTap: () async {
- await SemanticSearchService.instance.clearIndexes();
+ await showChoiceDialog(
+ context,
+ title: "Are you sure?",
+ body:
+ "You will need to again re-index or fetch all clip image embeddings.",
+ firstButtonLabel: "Yes, confirm",
+ firstButtonOnTap: () async {
+ try {
+ await SemanticSearchService.instance.clearIndexes();
+ showShortToast(context, "Done");
+ } catch (e, s) {
+ _logger.warning('drop clip embeddings failed ', e, s);
+ await showGenericErrorDialog(context: context, error: e);
+ }
+ },
+ );
},
),
],