mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 12:23:43 +00:00
fix: ios download path
This commit is contained in:
1 parent
abccbabc78
commit
a1a8abc25f
2 files changed
+4
-2
No files matched your search
@@ -417,13 +417,15 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
|||||||
if (config.downloadDir.isEmpty) {
|
if (config.downloadDir.isEmpty) {
|
||||||
if (Util.isDesktop()) {
|
if (Util.isDesktop()) {
|
||||||
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
||||||
} else if (Util.isMobile()) {
|
} else if (Util.isAndroid()) {
|
||||||
final downloadDir = (await DownloadsPath.downloadsDirectory())?.path;
|
final downloadDir = (await DownloadsPath.downloadsDirectory())?.path;
|
||||||
if (downloadDir != null) {
|
if (downloadDir != null) {
|
||||||
config.downloadDir = '$downloadDir/Gopeed';
|
config.downloadDir = '$downloadDir/Gopeed';
|
||||||
} else {
|
} else {
|
||||||
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||||
}
|
}
|
||||||
|
} else if (Util.isIOS()) {
|
||||||
|
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||||
} else {
|
} else {
|
||||||
config.downloadDir = './';
|
config.downloadDir = './';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class CreateView extends GetView<CreateController> {
|
|||||||
Row(children: [
|
Row(children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
autofocus: true,
|
autofocus: !Util.isMobile(),
|
||||||
controller: _urlController,
|
controller: _urlController,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
maxLines: 5,
|
maxLines: 5,
|
||||||
|
|||||||
Reference in new issue
Block a user