Desktop: Move preferences persistence to native (#3138)

* Move preference persistence to native

* Pass preferences as struct instead of serialized to string
This commit is contained in:
Timon
2025-09-09 16:22:25 +00:00
committed by GitHub
parent 4261b7dad1
commit 50be13522b
12 changed files with 80 additions and 20 deletions
+5
View File
@@ -415,6 +415,11 @@ impl EditorHandle {
#[wasm_bindgen(js_name = loadPreferences)]
pub fn load_preferences(&self, preferences: String) {
let Ok(preferences) = serde_json::from_str(&preferences) else {
log::error!("Failed to deserialize preferences");
return;
};
let message = PreferencesMessage::Load { preferences };
self.dispatch(message);