mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
remove check update from periodical call
This commit is contained in:
parent
c470f2734d
commit
f21f793343
@ -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;
|
||||
|
@ -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(() {});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user