mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-04 00:41:30 +03:00
merge mobile/desktop remote toobar code
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -77,15 +77,8 @@ class _RemotePageState extends State<RemotePage>
|
||||
late FFI _ffi;
|
||||
|
||||
void _initStates(String id) {
|
||||
PrivacyModeState.init(id);
|
||||
BlockInputState.init(id);
|
||||
CurrentDisplayState.init(id);
|
||||
KeyboardEnabledState.init(id);
|
||||
ShowRemoteCursorState.init(id);
|
||||
RemoteCursorMovedState.init(id);
|
||||
final optZoomCursor = 'zoom-cursor';
|
||||
PeerBoolOption.init(id, optZoomCursor, () => false);
|
||||
_zoomCursor = PeerBoolOption.find(id, optZoomCursor);
|
||||
initSharedStates(id);
|
||||
_zoomCursor = PeerBoolOption.find(id, 'zoom-cursor');
|
||||
_showRemoteCursor = ShowRemoteCursorState.find(id);
|
||||
_keyboardEnabled = KeyboardEnabledState.find(id);
|
||||
_remoteCursorMoved = RemoteCursorMovedState.find(id);
|
||||
@@ -93,15 +86,6 @@ class _RemotePageState extends State<RemotePage>
|
||||
_textureId = RxInt(-1);
|
||||
}
|
||||
|
||||
void _removeStates(String id) {
|
||||
PrivacyModeState.delete(id);
|
||||
BlockInputState.delete(id);
|
||||
CurrentDisplayState.delete(id);
|
||||
ShowRemoteCursorState.delete(id);
|
||||
KeyboardEnabledState.delete(id);
|
||||
RemoteCursorMovedState.delete(id);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -217,7 +201,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
}
|
||||
Get.delete<FFI>(tag: widget.id);
|
||||
super.dispose();
|
||||
_removeStates(widget.id);
|
||||
removeSharedStates(widget.id);
|
||||
}
|
||||
|
||||
Widget buildBody(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user