fix, the session image covers android toolbar

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-09-04 14:17:54 +08:00
parent eee47eae61
commit ea41a60057
5 changed files with 35 additions and 18 deletions

View File

@@ -554,23 +554,13 @@ class FfiModel with ChangeNotifier {
}
final connType = parent.target?.connType;
if (isPeerAndroid) {
_touchMode = true;
if (connType == ConnType.defaultConn &&
parent.target != null &&
parent.target!.ffiModel.permissions['keyboard'] != false) {
Timer(
const Duration(milliseconds: 100),
() => parent.target!.dialogManager
.showMobileActionsOverlay(ffi: parent.target!));
}
} else {
_touchMode = await bind.sessionGetOption(
sessionId: sessionId, arg: 'touch-mode') !=
'';
}
if (connType == ConnType.fileTransfer) {
parent.target?.fileModel.onReady();
} else if (connType == ConnType.defaultConn) {
@@ -616,6 +606,19 @@ class FfiModel with ChangeNotifier {
notifyListeners();
}
tryShowAndroidActionsOverlay({int delayMSecs = 10}) {
if (isPeerAndroid) {
if (parent.target?.connType == ConnType.defaultConn &&
parent.target != null &&
parent.target!.ffiModel.permissions['keyboard'] != false) {
Timer(
Duration(milliseconds: delayMSecs),
() => parent.target!.dialogManager
.showMobileActionsOverlay(ffi: parent.target!));
}
}
}
handleResolutions(String id, dynamic resolutions) {
try {
final List<dynamic> dynamicArray = jsonDecode(resolutions as String);