more granular control over ui option update.

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-21 23:25:00 +08:00
parent 23bdb38e9a
commit b1b867dd9d
3 changed files with 61 additions and 49 deletions

View File

@@ -107,6 +107,7 @@ pub fn callback_msg(
if let Ok(s) =
std::str::from_utf8(unsafe { std::slice::from_raw_parts(content as _, len) })
{
// No need to merge the msgs. Handling the msg one by one is ok.
if let Ok(msg) = serde_json::from_str::<MsgToConfig>(s) {
match &msg.r#type as _ {
config::CONFIG_TYPE_LOCAL => {