mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 06:13:42 +00:00
feat: Background download on iOS (#1442)
This commit is contained in:
1 parent
9d3221ebbb
commit
99924296ef
14 files changed
+383
-26
No files matched your search
@@ -22,6 +22,7 @@ import 'util/package_info.dart';
|
||||
import 'util/scheme_register/scheme_register.dart';
|
||||
import 'util/updater.dart';
|
||||
import 'util/util.dart';
|
||||
import 'app/services/location_keep_alive_coordinator.dart';
|
||||
|
||||
class StartupArgs {
|
||||
static const flagHidden = "hidden";
|
||||
@@ -135,6 +136,17 @@ Future<void> init(StartupArgs args) async {
|
||||
logger.w("auto-start tasks fail", e);
|
||||
}
|
||||
}
|
||||
|
||||
// iOS location keep-alive coordinator
|
||||
if (Util.isIOS()) {
|
||||
try {
|
||||
await Get.putAsync(() async => LocationKeepAliveCoordinator());
|
||||
await Get.find<LocationKeepAliveCoordinator>().reconcile();
|
||||
Get.find<LocationKeepAliveCoordinator>().startPolling();
|
||||
} catch (e) {
|
||||
logger.e("location keep-alive coordinator init fail", e);
|
||||
}
|
||||
}
|
||||
|
||||
() async {
|
||||
if (Util.isDesktop()) {
|
||||
|
||||
Reference in new issue
Block a user