From 27011fb96b29b5fa9414f8212af1379ae799dc38 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 27 Mar 2024 21:58:16 +0800 Subject: [PATCH] feat: Support Via Download task, require via version 5.5.0 or above(Android) (#412) (#419) --- ui/flutter/android/app/src/main/AndroidManifest.xml | 7 +++++++ .../lib/app/modules/app/controllers/app_controller.dart | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/flutter/android/app/src/main/AndroidManifest.xml b/ui/flutter/android/app/src/main/AndroidManifest.xml index e6dfc888..170778e1 100644 --- a/ui/flutter/android/app/src/main/AndroidManifest.xml +++ b/ui/flutter/android/app/src/main/AndroidManifest.xml @@ -71,6 +71,13 @@ + + + + + + + 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 0d555135..2c3555f8 100644 --- a/ui/flutter/lib/app/modules/app/controllers/app_controller.dart +++ b/ui/flutter/lib/app/modules/app/controllers/app_controller.dart @@ -274,7 +274,7 @@ class AppController extends GetxController with WindowListener, TrayListener { } Future _toCreate(Uri uri) async { - final path = uri.scheme == "magnet" + final path = (uri.scheme == "magnet" || uri.scheme == "http" || uri.scheme == "https") ? uri.toString() : (await toFile(uri.toString())).path; await Get.rootDelegate.offAndToNamed(Routes.CREATE, arguments: path);