Privacy mode, msgbox, add details

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-09-17 10:53:04 +08:00
parent eb5ea17610
commit db2e4f30a7
9 changed files with 112 additions and 41 deletions

View File

@@ -940,9 +940,12 @@ pub async fn post_request_sync(url: String, body: String, header: &str) -> Resul
}
#[inline]
pub fn make_privacy_mode_msg(state: back_notification::PrivacyModeState) -> Message {
pub fn make_privacy_mode_msg_with_details(state: back_notification::PrivacyModeState, details: String) -> Message {
let mut misc = Misc::new();
let mut back_notification = BackNotification::new();
let mut back_notification = BackNotification {
details,
..Default::default()
};
back_notification.set_privacy_mode_state(state);
misc.set_back_notification(back_notification);
let mut msg_out = Message::new();
@@ -950,6 +953,11 @@ pub fn make_privacy_mode_msg(state: back_notification::PrivacyModeState) -> Mess
msg_out
}
#[inline]
pub fn make_privacy_mode_msg(state: back_notification::PrivacyModeState) -> Message {
make_privacy_mode_msg_with_details(state, "".to_owned())
}
pub fn is_keyboard_mode_supported(keyboard_mode: &KeyboardMode, version_number: i64) -> bool {
match keyboard_mode {
KeyboardMode::Legacy => true,