flutter_desktop: handle privacy mode back notifications

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou committed 2022-08-09 11:03:56 +08:00
1 parent e553756ad8
commit b2ffe9dee4
8 files changed
+210 -38

No files matched your search

+17
View File
@@ -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 {