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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.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 {
|
_updateTimer = periodic_immediate(const Duration(seconds: 1), () async {
|
||||||
await gFFI.serverModel.fetchID();
|
await gFFI.serverModel.fetchID();
|
||||||
final url = await bind.mainGetSoftwareUpdateUrl();
|
|
||||||
if (updateUrl != url) {
|
|
||||||
updateUrl = url;
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
final error = await bind.mainGetError();
|
final error = await bind.mainGetError();
|
||||||
if (systemError != error) {
|
if (systemError != error) {
|
||||||
systemError = error;
|
systemError = error;
|
||||||
|
@ -57,7 +57,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
}();
|
}();
|
||||||
}
|
}
|
||||||
if (isAndroid) {
|
if (isAndroid) {
|
||||||
Timer(const Duration(seconds: 5), () async {
|
Timer(const Duration(seconds: 1), () async {
|
||||||
_updateUrl = await bind.mainGetSoftwareUpdateUrl();
|
_updateUrl = await bind.mainGetSoftwareUpdateUrl();
|
||||||
if (_updateUrl.isNotEmpty) setState(() {});
|
if (_updateUrl.isNotEmpty) setState(() {});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user