Skip to content

armgit / ente

Public Imported from GitHub
0

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

Invalidate cached runtime args when pet recognition is toggled

Amrithesh Kakkoth Enteba279f33a991
diff --git a/mobile/apps/photos/lib/ui/settings/debug/ml_debug_settings_page.dart b/mobile/apps/photos/lib/ui/settings/debug/ml_debug_settings_page.dart
index a4371e0f10..2895167ca8 100644
--- a/mobile/apps/photos/lib/ui/settings/debug/ml_debug_settings_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/debug/ml_debug_settings_page.dart
@@ -728,6 +728,9 @@ class _MLDebugSettingsPageState extends State<MLDebugSettingsPage> {
Future<void> _onPetRecognitionChanged() async {
try {
await localSettings.togglePetRecognition();
+ // Invalidate cached runtime args so pet model paths are rebuilt
+ // with the new toggle state on the next indexing run.
+ await MLIndexingIsolate.instance.releaseRustRuntime();
logger.info(
'Pet recognition is turned ${localSettings.petRecognitionEnabled ? 'on' : 'off'}',
);