Skip to content

Commit

Permalink
fix: ios download path
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Jan 19, 2024
1 parent abccbab commit a1a8abc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,15 @@ 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 getApplicationDocumentsDirectory()).path;
} else {
config.downloadDir = './';
}
Expand Down
2 changes: 1 addition & 1 deletion ui/flutter/lib/app/modules/create/views/create_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class CreateView extends GetView<CreateController> {
Row(children: [
Expanded(
child: TextFormField(
autofocus: true,
autofocus: !Util.isMobile(),
controller: _urlController,
minLines: 1,
maxLines: 5,
Expand Down

0 comments on commit a1a8abc

Please sign in to comment.