Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

remove all stupid canLaunchUrl

rustdesk8e4127b6a04f
diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart
index d978577ab..f89381a3f 100644
--- a/flutter/lib/desktop/pages/desktop_setting_page.dart
+++ b/flutter/lib/desktop/pages/desktop_setting_page.dart
@@ -607,7 +607,6 @@ class _GeneralState extends State<_General> {
bool user_dir_exists = await Directory(user_dir).exists();
bool root_dir_exists =
showRootDir ? await Directory(root_dir).exists() : false;
- // canLaunchUrl blocked on windows portable, user SYSTEM
return {
'user_dir': user_dir,
'root_dir': root_dir,
diff --git a/flutter/lib/mobile/pages/settings_page.dart b/flutter/lib/mobile/pages/settings_page.dart
index ede66d78a..83cfa2fb2 100644
--- a/flutter/lib/mobile/pages/settings_page.dart
+++ b/flutter/lib/mobile/pages/settings_page.dart
@@ -782,9 +782,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
tiles: [
SettingsTile(
onPressed: (context) async {
- if (await canLaunchUrl(Uri.parse(url))) {
- await launchUrl(Uri.parse(url));
- }
+ await launchUrl(Uri.parse(url));
},
title: Text(translate("Version: ") + version),
value: Padding(
@@ -928,9 +926,7 @@ void showAbout(OverlayDialogManager dialogManager) {
InkWell(
onTap: () async {
const url = 'https://rustdesk.com/';
- if (await canLaunchUrl(Uri.parse(url))) {
- await launchUrl(Uri.parse(url));
- }
+ await launchUrl(Uri.parse(url));
},
child: Padding(
padding: EdgeInsets.symmetric(vertical: 8),