Merge branch 'rustdesk:master' into master

This commit is contained in:
Sahil Yeole
2023-09-05 18:10:32 +05:30
committed by GitHub
10 changed files with 61 additions and 35 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);

View File

@@ -40,6 +40,8 @@ class ServerModel with ChangeNotifier {
late String _emptyIdShow;
late final IDTextEditingController _serverId;
final _serverPasswd =
TextEditingController(text: translate("Generating ..."));
final tabController = DesktopTabController(tabType: DesktopTabType.cm);
@@ -61,9 +63,6 @@ class ServerModel with ChangeNotifier {
int get connectStatus => _connectStatus;
TextEditingController get _serverPasswd =>
TextEditingController(text: translate("Generating ..."));
String get verificationMethod {
final index = [
kUseTemporaryPassword,