choose keyboard layout type, mid commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-12-27 16:45:13 +08:00
parent 5b3b7bd3c0
commit 48e684335e
11 changed files with 345 additions and 10 deletions

View File

@@ -998,6 +998,8 @@ pub struct LocalConfig {
#[serde(default)]
remote_id: String, // latest used one
#[serde(default)]
kb_layout_type: String,
#[serde(default)]
size: Size,
#[serde(default)]
pub fav: Vec<String>,
@@ -1017,6 +1019,14 @@ impl LocalConfig {
Config::store_(self, "_local");
}
pub fn get_kb_layout_type() -> String {
LOCAL_CONFIG.read().unwrap().kb_layout_type.clone()
}
pub fn set_kb_layout_type(kb_layout_type: String) {
LOCAL_CONFIG.write().unwrap().kb_layout_type = kb_layout_type
}
pub fn get_size() -> Size {
LOCAL_CONFIG.read().unwrap().size
}