Let indexing run freely on iOS (#1681)
This commit is contained in:
commit
4bddd24d63
2 changed files with 23 additions and 26 deletions
47
lib/app.dart
47
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
|
||||
|
@ -123,28 +127,21 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {
|
|||
),
|
||||
);
|
||||
} else {
|
||||
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,
|
||||
],
|
||||
),
|
||||
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,
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ description: ente photos application
|
|||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
|
||||
version: 0.8.48+568
|
||||
version: 0.8.49+569
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
Loading…
Add table
Reference in a new issue