Display indexing stats to all

This commit is contained in:
vishnukvmd 2023-12-18 23:01:43 +05:30
parent b6c8a79a78
commit 418fd2e1bb

View file

@ -112,28 +112,30 @@ class _MachineLearningSettingsPageState
const SizedBox(
height: 12,
),
hasEnabled && kDebugMode
hasEnabled
? Column(
children: [
const MagicSearchIndexStatsWidget(),
const SizedBox(
height: 12,
),
MenuItemWidget(
leadingIcon: Icons.delete_sweep_outlined,
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).clearIndexes,
),
menuItemColor: getEnteColorScheme(context).fillFaint,
singleBorderRadius: 8,
alwaysShowSuccessState: true,
onTap: () async {
await SemanticSearchService.instance.clearIndexes();
if (mounted) {
setState(() => {});
}
},
),
kDebugMode
? MenuItemWidget(
leadingIcon: Icons.delete_sweep_outlined,
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).clearIndexes,
),
menuItemColor: getEnteColorScheme(context).fillFaint,
singleBorderRadius: 8,
alwaysShowSuccessState: true,
onTap: () async {
await SemanticSearchService.instance.clearIndexes();
if (mounted) {
setState(() => {});
}
},
)
: const SizedBox.shrink(),
],
)
: const SizedBox.shrink(),