Skip to content

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

remove check update from periodical call

rustdeskf21f793343ab
diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart
index e48dda51d..c5d3718eb 100644
--- a/flutter/lib/desktop/pages/desktop_home_page.dart
+++ b/flutter/lib/desktop/pages/desktop_home_page.dart
@@ -499,13 +499,12 @@ class _DesktopHomePageState extends State<DesktopHomePage>
@override
void initState() {
super.initState();
+ Timer(const Duration(seconds: 1), () async {
+ updateUrl = await bind.mainGetSoftwareUpdateUrl();
+ if (updateUrl.isNotEmpty) setState(() {});
+ });
_updateTimer = periodic_immediate(const Duration(seconds: 1), () async {
await gFFI.serverModel.fetchID();
- final url = await bind.mainGetSoftwareUpdateUrl();
- if (updateUrl != url) {
- updateUrl = url;
- setState(() {});
- }
final error = await bind.mainGetError();
if (systemError != error) {
systemError = error;
diff --git a/flutter/lib/mobile/pages/connection_page.dart b/flutter/lib/mobile/pages/connection_page.dart
index 5a61a2fc8..c9bd15709 100644
--- a/flutter/lib/mobile/pages/connection_page.dart
+++ b/flutter/lib/mobile/pages/connection_page.dart
@@ -57,7 +57,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
}();
}
if (isAndroid) {
- Timer(const Duration(seconds: 5), () async {
+ Timer(const Duration(seconds: 1), () async {
_updateUrl = await bind.mainGetSoftwareUpdateUrl();
if (_updateUrl.isNotEmpty) setState(() {});
});