use ab cache init show and show custom loading when ab not emtpy

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-11 15:27:50 +08:00
parent ea12eccc90
commit bea88f31e0
6 changed files with 160 additions and 17 deletions

View File

@@ -1165,6 +1165,10 @@ pub fn main_clear_ab() {
config::Ab::remove();
}
pub fn main_load_ab() -> String {
serde_json::to_string(&config::Ab::load()).unwrap_or_default()
}
pub fn session_send_pointer(session_id: SessionID, msg: String) {
if let Ok(m) = serde_json::from_str::<HashMap<String, serde_json::Value>>(&msg) {
let alt = m.get("alt").is_some();