Merge pull request #5297 from dignow/doc/get_flutter_config_from_file
add comments
This commit is contained in:
commit
9093d29ae4
@ -1543,6 +1543,9 @@ Future<bool> restoreWindowPosition(WindowType type,
|
|||||||
bool isRemotePeerPos = false;
|
bool isRemotePeerPos = false;
|
||||||
String? pos;
|
String? pos;
|
||||||
if (type == WindowType.RemoteDesktop && windowId != null && peerId != null) {
|
if (type == WindowType.RemoteDesktop && windowId != null && peerId != null) {
|
||||||
|
// If the restore position is called by main window, and the peer id is not null
|
||||||
|
// then we may need to get the position by reading the peer config.
|
||||||
|
// Because the session may not be read at this time.
|
||||||
if (desktopType == DesktopType.main) {
|
if (desktopType == DesktopType.main) {
|
||||||
pos = bind.mainGetPeerFlutterConfigSync(
|
pos = bind.mainGetPeerFlutterConfigSync(
|
||||||
id: peerId, k: kWindowPrefix + type.name);
|
id: peerId, k: kWindowPrefix + type.name);
|
||||||
|
@ -806,6 +806,8 @@ pub fn main_get_peer_option_sync(id: String, key: String) -> SyncReturn<String>
|
|||||||
SyncReturn(get_peer_option(id, key))
|
SyncReturn(get_peer_option(id, key))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sometimes we need to get the flutter config of a peer by reading the file.
|
||||||
|
// Because the session may not be established yet.
|
||||||
pub fn main_get_peer_flutter_config_sync(id: String, k: String) -> SyncReturn<String> {
|
pub fn main_get_peer_flutter_config_sync(id: String, k: String) -> SyncReturn<String> {
|
||||||
SyncReturn(get_peer_flutter_config(id, k))
|
SyncReturn(get_peer_flutter_config(id, k))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user