Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove special casing for background execution

vishnukvmdd8541e6a464f
diff --git a/lib/main.dart b/lib/main.dart
index 4e2634c05b..91c17974ad 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -194,7 +194,7 @@ Future<void> _init(bool isBackground, {String via = ''}) async {
});
}
unawaited(FeatureFlagService.instance.init());
- unawaited(SemanticSearchService.instance.init(isInBackground: isBackground));
+ unawaited(SemanticSearchService.instance.init());
MachineLearningController.instance.init();
// Can not including existing tf/ml binaries as they are not being built
// from source.
diff --git a/lib/services/machine_learning/semantic_search/semantic_search_service.dart b/lib/services/machine_learning/semantic_search/semantic_search_service.dart
index b0999d48f8..3600ebb0ac 100644
--- a/lib/services/machine_learning/semantic_search/semantic_search_service.dart
+++ b/lib/services/machine_learning/semantic_search/semantic_search_service.dart
@@ -55,10 +55,7 @@ class SemanticSearchService {
get hasInitialized => _hasInitialized;
- Future<void> init({
- bool shouldSyncImmediately = false,
- bool isInBackground = false,
- }) async {
+ Future<void> init({bool shouldSyncImmediately = false}) async {
if (!LocalSettings.instance.hasEnabledMagicSearch()) {
return;
}
@@ -103,10 +100,6 @@ class SemanticSearchService {
if (shouldSyncImmediately) {
unawaited(sync());
}
- if (isInBackground) {
- // Do not block on user interactions
- _startIndexing();
- }
Bus.instance.on<MachineLearningControlEvent>().listen((event) {
if (event.shouldRun) {
_startIndexing();