From 1d038f1c78c8c00ecbb6d65ef47d06f7889ef4a3 Mon Sep 17 00:00:00 2001 From: Morn Date: Tue, 17 Jun 2025 10:25:17 +0800 Subject: [PATCH 1/2] fix: regression in handling on non-standard URLs on Windows --- .../appflowy_flutter/lib/core/helpers/url_launcher.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart b/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart index 4ca51f8ea4d93..7a5e58b802dc2 100644 --- a/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart +++ b/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart @@ -12,6 +12,9 @@ import 'package:open_filex/open_filex.dart'; import 'package:string_validator/string_validator.dart'; import 'package:universal_platform/universal_platform.dart'; import 'package:url_launcher/url_launcher.dart' as launcher; +// ignore: implementation_imports +import 'package:appflowy_editor/src/editor/util/link_util.dart' + show isCustomUrL; typedef OnFailureCallback = void Function(Uri uri); @@ -39,10 +42,12 @@ Future afLaunchUri( ); } - // on Linux or Android or Windows, add http scheme to the url if it is not present + // on Linux or Android, add http scheme to the url if it is not present + final isNotCustomUrlOnWidows = + UniversalPlatform.isWindows && !isCustomUrL(url); if ((UniversalPlatform.isLinux || UniversalPlatform.isAndroid || - UniversalPlatform.isWindows) && + isNotCustomUrlOnWidows) && !isURL(url, {'require_protocol': true})) { uri = Uri.parse('https://$url'); } From 1269b5b6317d8ddb799f9902f3af17caf36ae547 Mon Sep 17 00:00:00 2001 From: Morn Date: Mon, 14 Jul 2025 10:29:11 +0800 Subject: [PATCH 2/2] chore: typo issue --- frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart b/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart index 7a5e58b802dc2..73f62758445f1 100644 --- a/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart +++ b/frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart @@ -43,11 +43,11 @@ Future afLaunchUri( } // on Linux or Android, add http scheme to the url if it is not present - final isNotCustomUrlOnWidows = + final isNotCustomUrlOnWindows = UniversalPlatform.isWindows && !isCustomUrL(url); if ((UniversalPlatform.isLinux || UniversalPlatform.isAndroid || - isNotCustomUrlOnWidows) && + isNotCustomUrlOnWindows) && !isURL(url, {'require_protocol': true})) { uri = Uri.parse('https://$url'); }