Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix potential cache issue

laurenspriemf3a8d6b36737
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart
index 46c91cfaa5..fc3edc978b 100644
--- a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart
@@ -120,12 +120,13 @@ class MLIndexingIsolate extends SuperIsolate {
}
return _rustRuntimeLock.synchronized(() async {
final rustRuntimeArgs = await _buildRustRuntimeArgs();
- _cachedRustRuntimeArgs =
+ final frozenRuntimeArgs =
Map<String, dynamic>.unmodifiable(rustRuntimeArgs);
await runInIsolate(
IsolateOperation.prepareRustMlRuntime,
- _cachedRustRuntimeArgs!,
+ frozenRuntimeArgs,
);
+ _cachedRustRuntimeArgs = frozenRuntimeArgs;
});
}