mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
Merge pull request #5331 from dignow/fix/save_peer_window_pos
fix saving peer window pos
This commit is contained in:
@@ -1863,14 +1863,14 @@ Future<void> setCanvasConfig(
|
||||
p['yCanvas'] = yCanvas;
|
||||
p['scale'] = scale;
|
||||
p['currentDisplay'] = currentDisplay;
|
||||
await bind.sessionSetFlutterConfig(
|
||||
await bind.sessionSetFlutterOption(
|
||||
sessionId: sessionId, k: canvasKey, v: jsonEncode(p));
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>?> getCanvasConfig(SessionID sessionId) async {
|
||||
if (!isWebDesktop) return null;
|
||||
var p =
|
||||
await bind.sessionGetFlutterConfig(sessionId: sessionId, k: canvasKey);
|
||||
await bind.sessionGetFlutterOption(sessionId: sessionId, k: canvasKey);
|
||||
if (p == null || p.isEmpty) return null;
|
||||
try {
|
||||
Map<String, dynamic> m = json.decode(p);
|
||||
|
||||
@@ -51,7 +51,7 @@ class PeerTabModel with ChangeNotifier {
|
||||
PeerTabModel(this.parent) {
|
||||
// init currentTab
|
||||
_currentTab =
|
||||
int.tryParse(bind.getLocalFlutterConfig(k: 'peer-tab-index')) ?? 0;
|
||||
int.tryParse(bind.getLocalFlutterOption(k: 'peer-tab-index')) ?? 0;
|
||||
if (_currentTab < 0 || _currentTab >= tabNames.length) {
|
||||
_currentTab = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user