Skip to content

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

use await to guarantee the calling order

dignow731ecfda64f6
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart
index dab3a3e9b..0f6cc5b9c 100644
--- a/flutter/lib/models/model.dart
+++ b/flutter/lib/models/model.dart
@@ -203,11 +203,11 @@ class FfiModel with ChangeNotifier {
}, sessionId, peerId);
updatePrivacyMode(data.updatePrivacyMode, sessionId, peerId);
setConnectionType(peerId, data.secure, data.direct);
- handlePeerInfo(data.peerInfo, peerId);
+ await handlePeerInfo(data.peerInfo, peerId);
for (var element in data.cursorDataList) {
- handleCursorData(element);
+ await handleCursorData(element);
}
- handleCursorId(data.lastCursorId);
+ await handleCursorId(data.lastCursorId);
}
// todo: why called by two position
@@ -1802,7 +1802,7 @@ class FFI {
debugPrint('Unreachable, the cached data cannot be decoded.');
return;
}
- ffiModel.handleCachedPeerData(data, id);
+ await ffiModel.handleCachedPeerData(data, id);
await bind.sessionRefresh(sessionId: sessionId);
});
isToNewWindowNotified.value = true;