new fetchID and periodic_immediate

This commit is contained in:
rustdesk
2022-11-29 22:36:35 +08:00
parent 60dcd96874
commit 6e1f8f0294
4 changed files with 15 additions and 22 deletions

View File

@@ -461,7 +461,8 @@ class _DesktopHomePageState extends State<DesktopHomePage>
void initState() {
super.initState();
bind.mainStartGrabKeyboard();
_updateTimer = Timer.periodic(const Duration(seconds: 1), (timer) async {
_updateTimer = periodic_immediate(const Duration(seconds: 1), () async {
await gFFI.serverModel.fetchID();
final url = await bind.mainGetSoftwareUpdateUrl();
if (updateUrl != url) {
updateUrl = url;