add listener to root of the app also when (Platform.isAndroid || kDebugMode) is false
This commit is contained in:
parent
c2c858448a
commit
775fc68f16
1 changed files with 22 additions and 15 deletions
37
lib/app.dart
37
lib/app.dart
|
@ -123,21 +123,28 @@ class _EnteAppState extends State<EnteApp> 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,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue