fix: multi-window, init perms (#7839)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
2626dcbc5f
commit
796b66b057
@ -50,6 +50,8 @@ class CachedPeerData {
|
|||||||
Map<String, dynamic> peerInfo = {};
|
Map<String, dynamic> peerInfo = {};
|
||||||
List<Map<String, dynamic>> cursorDataList = [];
|
List<Map<String, dynamic>> cursorDataList = [];
|
||||||
Map<String, dynamic> lastCursorId = {};
|
Map<String, dynamic> lastCursorId = {};
|
||||||
|
Map<String, bool> permissions = {};
|
||||||
|
|
||||||
bool secure = false;
|
bool secure = false;
|
||||||
bool direct = false;
|
bool direct = false;
|
||||||
|
|
||||||
@ -62,6 +64,7 @@ class CachedPeerData {
|
|||||||
'peerInfo': peerInfo,
|
'peerInfo': peerInfo,
|
||||||
'cursorDataList': cursorDataList,
|
'cursorDataList': cursorDataList,
|
||||||
'lastCursorId': lastCursorId,
|
'lastCursorId': lastCursorId,
|
||||||
|
'permissions': permissions,
|
||||||
'secure': secure,
|
'secure': secure,
|
||||||
'direct': direct,
|
'direct': direct,
|
||||||
});
|
});
|
||||||
@ -77,6 +80,9 @@ class CachedPeerData {
|
|||||||
data.cursorDataList.add(cursorData);
|
data.cursorDataList.add(cursorData);
|
||||||
}
|
}
|
||||||
data.lastCursorId = map['lastCursorId'];
|
data.lastCursorId = map['lastCursorId'];
|
||||||
|
map['permissions'].forEach((key, value) {
|
||||||
|
data.permissions[key] = value;
|
||||||
|
});
|
||||||
data.secure = map['secure'];
|
data.secure = map['secure'];
|
||||||
data.direct = map['direct'];
|
data.direct = map['direct'];
|
||||||
return data;
|
return data;
|
||||||
@ -116,6 +122,10 @@ class FfiModel with ChangeNotifier {
|
|||||||
_pi.tryGetDisplayIfNotAllDisplay()?.isOriginalResolution ?? false;
|
_pi.tryGetDisplayIfNotAllDisplay()?.isOriginalResolution ?? false;
|
||||||
|
|
||||||
Map<String, bool> get permissions => _permissions;
|
Map<String, bool> get permissions => _permissions;
|
||||||
|
setPermissions(Map<String, bool> permissions) {
|
||||||
|
_permissions.clear();
|
||||||
|
_permissions.addAll(permissions);
|
||||||
|
}
|
||||||
|
|
||||||
bool? get secure => _secure;
|
bool? get secure => _secure;
|
||||||
|
|
||||||
@ -138,6 +148,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
FfiModel(this.parent) {
|
FfiModel(this.parent) {
|
||||||
clear();
|
clear();
|
||||||
sessionId = parent.target!.sessionId;
|
sessionId = parent.target!.sessionId;
|
||||||
|
cachedPeerData.permissions = _permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect? globalDisplaysRect() => _getDisplaysRect(_pi.displays, true);
|
Rect? globalDisplaysRect() => _getDisplaysRect(_pi.displays, true);
|
||||||
@ -2342,6 +2353,7 @@ class FFI {
|
|||||||
debugPrint('Unreachable, the cached data cannot be decoded.');
|
debugPrint('Unreachable, the cached data cannot be decoded.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ffiModel.setPermissions(data.permissions);
|
||||||
await ffiModel.handleCachedPeerData(data, id);
|
await ffiModel.handleCachedPeerData(data, id);
|
||||||
await sessionRefreshVideo(sessionId, ffiModel.pi);
|
await sessionRefreshVideo(sessionId, ffiModel.pi);
|
||||||
await bind.sessionRequestNewDisplayInitMsgs(
|
await bind.sessionRequestNewDisplayInitMsgs(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user