mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-08-20 13:31:18 +08:00
flutter_desktop: handle privacy mode back notifications
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@ -173,6 +173,10 @@ class FfiModel with ChangeNotifier {
|
||||
parent.target?.serverModel.onClientRemove(evt);
|
||||
} else if (name == 'update_quality_status') {
|
||||
parent.target?.qualityMonitorModel.updateQualityStatus(evt);
|
||||
} else if (name == 'update_block_input_state') {
|
||||
updateBlockInputState(evt);
|
||||
} else if (name == 'update_privacy_mode') {
|
||||
updatePrivacyMode(evt);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -228,6 +232,10 @@ class FfiModel with ChangeNotifier {
|
||||
parent.target?.serverModel.onClientRemove(evt);
|
||||
} else if (name == 'update_quality_status') {
|
||||
parent.target?.qualityMonitorModel.updateQualityStatus(evt);
|
||||
} else if (name == 'update_block_input_state') {
|
||||
updateBlockInputState(evt);
|
||||
} else if (name == 'update_privacy_mode') {
|
||||
updatePrivacyMode(evt);
|
||||
}
|
||||
};
|
||||
platformFFI.setEventCallback(cb);
|
||||
@ -331,6 +339,15 @@ class FfiModel with ChangeNotifier {
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
updateBlockInputState(Map<String, dynamic> evt) {
|
||||
_inputBlocked = evt['input_state'] == 'on';
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
updatePrivacyMode(Map<String, dynamic> evt) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
class ImageModel with ChangeNotifier {
|
||||
|
Reference in New Issue
Block a user