mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
feat/virtual_display_privacy_mode
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -967,11 +967,21 @@ class FfiModel with ChangeNotifier {
|
||||
}
|
||||
|
||||
updatePrivacyMode(
|
||||
Map<String, dynamic> evt, SessionID sessionId, String peerId) {
|
||||
Map<String, dynamic> evt, SessionID sessionId, String peerId) async {
|
||||
notifyListeners();
|
||||
try {
|
||||
PrivacyModeState.find(peerId).value = bind.sessionGetToggleOptionSync(
|
||||
final isOn = bind.sessionGetToggleOptionSync(
|
||||
sessionId: sessionId, arg: 'privacy-mode');
|
||||
if (isOn) {
|
||||
var privacyModeImpl = await bind.sessionGetOption(
|
||||
sessionId: sessionId, arg: 'privacy-mode-impl-key');
|
||||
// For compatibility, version < 1.2.4, the default value is 'privacy_mode_impl_mag'.
|
||||
final initDefaultPrivacyMode = 'privacy_mode_impl_mag';
|
||||
PrivacyModeState.find(peerId).value =
|
||||
privacyModeImpl ?? initDefaultPrivacyMode;
|
||||
} else {
|
||||
PrivacyModeState.find(peerId).value = '';
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user