From 1c1fab2002107e2918d99bf49949f851b2cbe87b Mon Sep 17 00:00:00 2001 From: liwei Date: Fri, 19 Jan 2024 11:54:36 +0800 Subject: [PATCH] test --- .../lib/app/modules/app/controllers/app_controller.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/flutter/lib/app/modules/app/controllers/app_controller.dart b/ui/flutter/lib/app/modules/app/controllers/app_controller.dart index 64e0c2c5..f1e11f11 100644 --- a/ui/flutter/lib/app/modules/app/controllers/app_controller.dart +++ b/ui/flutter/lib/app/modules/app/controllers/app_controller.dart @@ -417,13 +417,16 @@ class AppController extends GetxController with WindowListener, TrayListener { if (config.downloadDir.isEmpty) { if (Util.isDesktop()) { config.downloadDir = (await getDownloadsDirectory())?.path ?? "./"; - } else if (Util.isMobile()) { + } else if (Util.isAndroid()) { final downloadDir = (await DownloadsPath.downloadsDirectory())?.path; if (downloadDir != null) { config.downloadDir = '$downloadDir/Gopeed'; } else { config.downloadDir = (await getApplicationDocumentsDirectory()).path; } + } else if (Util.isIOS()) { + config.downloadDir = (await DownloadsPath.downloadsDirectory())?.path ?? + (await getApplicationDocumentsDirectory()).path; } else { config.downloadDir = './'; }