mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
fix: merge conflict
This commit is contained in:
@@ -306,7 +306,7 @@ class PermissionManager {
|
||||
if (!permissions.contains(type))
|
||||
return Future.error("Wrong permission!$type");
|
||||
|
||||
FFI.invokeMethod("request_permission", type);
|
||||
gFFI.invokeMethod("request_permission", type);
|
||||
if (type == "ignore_battery_optimizations") {
|
||||
return Future.value(false);
|
||||
}
|
||||
|
||||
@@ -516,10 +516,10 @@ class _RemotePageState extends State<RemotePage> {
|
||||
},
|
||||
onLongPress: () {
|
||||
if (touchMode) {
|
||||
FFI.cursorModel
|
||||
gFFI.cursorModel
|
||||
.move(_cacheLongPressPosition.dx, _cacheLongPressPosition.dy);
|
||||
}
|
||||
FFI.tap(MouseButtons.right);
|
||||
gFFI.tap(MouseButtons.right);
|
||||
},
|
||||
onDoubleFinerTap: (d) {
|
||||
if (!touchMode) {
|
||||
@@ -546,13 +546,13 @@ class _RemotePageState extends State<RemotePage> {
|
||||
gFFI.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
||||
gFFI.sendMouse('down', MouseButtons.left);
|
||||
} else {
|
||||
final cursorX = FFI.cursorModel.x;
|
||||
final cursorY = FFI.cursorModel.y;
|
||||
final cursorX = gFFI.cursorModel.x;
|
||||
final cursorY = gFFI.cursorModel.y;
|
||||
final visible =
|
||||
FFI.cursorModel.getVisibleRect().inflate(1); // extend edges
|
||||
gFFI.cursorModel.getVisibleRect().inflate(1); // extend edges
|
||||
final size = MediaQueryData.fromWindow(ui.window).size;
|
||||
if (!visible.contains(Offset(cursorX, cursorY))) {
|
||||
FFI.cursorModel.move(size.width / 2, size.height / 2);
|
||||
gFFI.cursorModel.move(size.width / 2, size.height / 2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -75,7 +70,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
Widget build(BuildContext context) {
|
||||
Provider.of<FfiModel>(context);
|
||||
final username = getUsername();
|
||||
final enableAbr = FFI.getByName("option", "enable-abr") != 'N';
|
||||
final enableAbr = gFFI.getByName("option", "enable-abr") != 'N';
|
||||
final enhancementsTiles = [
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Adaptive Bitrate') + '(beta)'),
|
||||
@@ -87,7 +82,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
if (!v) {
|
||||
msg["value"] = "N";
|
||||
}
|
||||
FFI.setByName("option", json.encode(msg));
|
||||
gFFI.setByName("option", json.encode(msg));
|
||||
setState(() {});
|
||||
},
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ void showError({Duration duration = SEC1}) {
|
||||
}
|
||||
|
||||
void setPermanentPasswordDialog() {
|
||||
final pw = FFI.getByName("permanent_password");
|
||||
final pw = gFFI.getByName("permanent_password");
|
||||
final p0 = TextEditingController(text: pw);
|
||||
final p1 = TextEditingController(text: pw);
|
||||
var validateLength = false;
|
||||
@@ -105,7 +105,7 @@ void setPermanentPasswordDialog() {
|
||||
|
||||
void setTemporaryPasswordLengthDialog() {
|
||||
List<String> lengths = ['6', '8', '10'];
|
||||
String length = FFI.getByName('option', 'temporary-password-length');
|
||||
String length = gFFI.getByName('option', 'temporary-password-length');
|
||||
var index = lengths.indexOf(length);
|
||||
if (index < 0) index = 0;
|
||||
length = lengths[index];
|
||||
@@ -119,8 +119,8 @@ void setTemporaryPasswordLengthDialog() {
|
||||
Map<String, String> msg = Map()
|
||||
..["name"] = "temporary-password-length"
|
||||
..["value"] = newValue;
|
||||
FFI.setByName("option", jsonEncode(msg));
|
||||
FFI.setByName("temporary_password");
|
||||
gFFI.setByName("option", jsonEncode(msg));
|
||||
gFFI.setByName("temporary_password");
|
||||
Future.delayed(Duration(milliseconds: 200), () {
|
||||
close();
|
||||
showSuccess();
|
||||
|
||||
@@ -126,8 +126,9 @@ class ServerModel with ChangeNotifier {
|
||||
|
||||
updatePasswordModel() {
|
||||
var update = false;
|
||||
final temporaryPassword = FFI.getByName("temporary_password");
|
||||
final verificationMethod = FFI.getByName("option", "verification-method");
|
||||
final temporaryPassword = gFFI.getByName("temporary_password");
|
||||
print("tempo passwd: ${temporaryPassword}");
|
||||
final verificationMethod = gFFI.getByName("option", "verification-method");
|
||||
if (_serverPasswd.text != temporaryPassword) {
|
||||
_serverPasswd.text = temporaryPassword;
|
||||
update = true;
|
||||
@@ -286,7 +287,7 @@ class ServerModel with ChangeNotifier {
|
||||
const maxCount = 10;
|
||||
while (count < maxCount) {
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
final id = parent.target?.getByName("server_id");
|
||||
final id = parent.target?.getByName("server_id") ?? "";
|
||||
if (id.isEmpty) {
|
||||
continue;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user