diff --git a/lib/app.dart b/lib/app.dart index c5907cc14..42de3e7ee 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -123,21 +123,28 @@ class _EnteAppState extends State with WidgetsBindingObserver { ), ); } else { - return MaterialApp( - title: "ente", - themeMode: ThemeMode.system, - theme: lightThemeData, - darkTheme: darkThemeData, - home: const HomeWidget(), - debugShowCheckedModeBanner: false, - builder: EasyLoading.init(), - locale: locale, - supportedLocales: appSupportedLocales, - localeListResolutionCallback: localResolutionCallBack, - localizationsDelegates: const [ - ...AppLocalizations.localizationsDelegates, - S.delegate, - ], + return Listener( + onPointerDown: (event) { + SemanticSearchService.instance.pauseIndexing(); + debugPrint("user is interacting with the app"); + _resetTimer(); + }, + child: MaterialApp( + title: "ente", + themeMode: ThemeMode.system, + theme: lightThemeData, + darkTheme: darkThemeData, + home: const HomeWidget(), + debugShowCheckedModeBanner: false, + builder: EasyLoading.init(), + locale: locale, + supportedLocales: appSupportedLocales, + localeListResolutionCallback: localResolutionCallBack, + localizationsDelegates: const [ + ...AppLocalizations.localizationsDelegates, + S.delegate, + ], + ), ); } }