Merge pull request #3708 from fufesou/fix/show_remote_cursor_state_on_file_transfer_page
Better peer info handler
This commit is contained in:
commit
7371b9b66b
@ -402,10 +402,12 @@ class FfiModel with ChangeNotifier {
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final connType = parent.target?.connType;
|
||||||
|
|
||||||
if (isPeerAndroid) {
|
if (isPeerAndroid) {
|
||||||
_touchMode = true;
|
_touchMode = true;
|
||||||
if (parent.target != null &&
|
if (connType == ConnType.defaultConn &&
|
||||||
parent.target!.connType == ConnType.defaultConn &&
|
parent.target != null &&
|
||||||
parent.target!.ffiModel.permissions['keyboard'] != false) {
|
parent.target!.ffiModel.permissions['keyboard'] != false) {
|
||||||
Timer(
|
Timer(
|
||||||
const Duration(milliseconds: 100),
|
const Duration(milliseconds: 100),
|
||||||
@ -417,10 +419,9 @@ class FfiModel with ChangeNotifier {
|
|||||||
await bind.sessionGetOption(id: peerId, arg: 'touch-mode') != '';
|
await bind.sessionGetOption(id: peerId, arg: 'touch-mode') != '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent.target != null &&
|
if (connType == ConnType.fileTransfer) {
|
||||||
parent.target!.connType == ConnType.fileTransfer) {
|
|
||||||
parent.target?.fileModel.onReady();
|
parent.target?.fileModel.onReady();
|
||||||
} else {
|
} else if (connType == ConnType.defaultConn) {
|
||||||
_pi.displays = [];
|
_pi.displays = [];
|
||||||
List<dynamic> displays = json.decode(evt['displays']);
|
List<dynamic> displays = json.decode(evt['displays']);
|
||||||
for (int i = 0; i < displays.length; ++i) {
|
for (int i = 0; i < displays.length; ++i) {
|
||||||
@ -450,8 +451,10 @@ class FfiModel with ChangeNotifier {
|
|||||||
handleResolutions(peerId, evt["resolutions"]);
|
handleResolutions(peerId, evt["resolutions"]);
|
||||||
parent.target?.elevationModel.onPeerInfo(_pi);
|
parent.target?.elevationModel.onPeerInfo(_pi);
|
||||||
}
|
}
|
||||||
setViewOnly(
|
if (connType == ConnType.defaultConn) {
|
||||||
peerId, bind.sessionGetToggleOptionSync(id: peerId, arg: 'view-only'));
|
setViewOnly(peerId,
|
||||||
|
bind.sessionGetToggleOptionSync(id: peerId, arg: 'view-only'));
|
||||||
|
}
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user