workaround for
This commit is contained in:
parent
6745492417
commit
f05ac099e7
@ -535,12 +535,19 @@ class FfiModel with ChangeNotifier {
|
|||||||
|
|
||||||
void setViewOnly(String id, bool value) {
|
void setViewOnly(String id, bool value) {
|
||||||
if (version_cmp(_pi.version, '1.2.0') < 0) return;
|
if (version_cmp(_pi.version, '1.2.0') < 0) return;
|
||||||
|
// tmp fix for https://github.com/rustdesk/rustdesk/pull/3706#issuecomment-1481242389
|
||||||
|
// because below rx not used in mobile version, so not initialized, below code will cause crash
|
||||||
|
// current our flutter code quality is fucking shit now. !!!!!!!!!!!!!!!!
|
||||||
|
try {
|
||||||
if (value) {
|
if (value) {
|
||||||
ShowRemoteCursorState.find(id).value = value;
|
ShowRemoteCursorState.find(id).value = value;
|
||||||
} else {
|
} else {
|
||||||
ShowRemoteCursorState.find(id).value =
|
ShowRemoteCursorState.find(id).value =
|
||||||
bind.sessionGetToggleOptionSync(id: id, arg: 'show-remote-cursor');
|
bind.sessionGetToggleOptionSync(id: id, arg: 'show-remote-cursor');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
if (_viewOnly != value) {
|
if (_viewOnly != value) {
|
||||||
_viewOnly = value;
|
_viewOnly = value;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user