diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 691bed75c..ba724eed5 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -834,10 +834,6 @@ class _DesktopHomePageState extends State _uniLinksSubscription?.cancel(); Get.delete(tag: 'stop-service'); _updateTimer?.cancel(); - if (!bind.isCustomClient()) { - platformFFI.unregisterEventHandler( - kCheckSoftwareUpdateFinish, kCheckSoftwareUpdateFinish); - } WidgetsBinding.instance.removeObserver(this); super.dispose(); } diff --git a/flutter/lib/mobile/pages/connection_page.dart b/flutter/lib/mobile/pages/connection_page.dart index 49e3b2c91..2d8fe9765 100644 --- a/flutter/lib/mobile/pages/connection_page.dart +++ b/flutter/lib/mobile/pages/connection_page.dart @@ -107,7 +107,7 @@ class _ConnectionPageState extends State { : InkWell( onTap: () async { final url = 'https://rustdesk.com/download'; - // https://pub.dev/packages/url_launcher#configuration + // https://pub.dev/packages/url_launcher#configuration // https://developer.android.com/training/package-visibility/use-cases#open-urls-custom-tabs // // `await launchUrl(Uri.parse(url))` can also run if skip @@ -115,9 +115,7 @@ class _ConnectionPageState extends State { // 2. `` in AndroidManifest.xml // // But it is better to add the check. - if (await canLaunchUrl(Uri.parse(url))) { - await launchUrl(Uri.parse(url)); - } + await launchUrl(Uri.parse(url)); }, child: Container( alignment: AlignmentDirectional.center, @@ -370,10 +368,6 @@ class _ConnectionPageState extends State { if (Get.isRegistered()) { Get.delete(); } - if (!bind.isCustomClient()) { - platformFFI.unregisterEventHandler( - kCheckSoftwareUpdateFinish, kCheckSoftwareUpdateFinish); - } super.dispose(); } }