Ver Fonte

Start indexing on iOS on app start

vishnukvmd há 1 ano atrás
pai
commit
4ee94c5b1a
1 ficheiros alterados com 7 adições e 3 exclusões
  1. 7 3
      lib/app.dart

+ 7 - 3
lib/app.dart

@@ -82,10 +82,14 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {
   }
 
   void _setupInteractionTimer({Duration timeout = defaultInteractionTimeout}) {
-    _userInteractionTimer = Timer(timeout, () {
-      debugPrint("user is not interacting with the app");
+    if (Platform.isAndroid || kDebugMode) {
+      _userInteractionTimer = Timer(timeout, () {
+        debugPrint("user is not interacting with the app");
+        SemanticSearchService.instance.resumeIndexing();
+      });
+    } else {
       SemanticSearchService.instance.resumeIndexing();
-    });
+    }
   }
 
   @override