mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
do not show privacy action if peer does not support
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1170,7 +1170,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
}
|
||||
displayMenu.add(_createSwitchMenuEntry(
|
||||
'Lock after session end', 'lock-after-session-end', padding, true));
|
||||
if (pi.platform == 'Windows') {
|
||||
if (pi.features.privacyMode) {
|
||||
displayMenu.add(MenuEntrySwitch2<String>(
|
||||
switchType: SwitchType.scheckbox,
|
||||
text: translate('Privacy mode'),
|
||||
|
||||
@@ -344,6 +344,8 @@ class FfiModel with ChangeNotifier {
|
||||
_waitForImage[peerId] = true;
|
||||
_reconnects = 1;
|
||||
}
|
||||
Map<String, dynamic> features = json.decode(evt['features']);
|
||||
_pi.features.privacyMode = features['privacy_mode'] == 1;
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -1328,6 +1330,10 @@ class Display {
|
||||
}
|
||||
}
|
||||
|
||||
class Features {
|
||||
bool privacyMode = false;
|
||||
}
|
||||
|
||||
class PeerInfo {
|
||||
String version = '';
|
||||
String username = '';
|
||||
@@ -1336,6 +1342,7 @@ class PeerInfo {
|
||||
bool sasEnabled = false;
|
||||
int currentDisplay = 0;
|
||||
List<Display> displays = [];
|
||||
Features features = Features();
|
||||
}
|
||||
|
||||
const canvasKey = 'canvas';
|
||||
|
||||
Reference in New Issue
Block a user