mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 06:28:12 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user