fix(app-settings): persist and prune pinned tree nodes

This commit is contained in:
t8y2 committed 2026-05-22 14:28:40 +08:00
1 parent 0e189ba0cc
commit 1ef09e8975
12 files changed
+237 -2

No files matched your search

+10
View File
@@ -23,3 +23,13 @@ pub async fn save_desktop_settings(
}
Ok(())
}
#[tauri::command]
pub async fn load_pinned_tree_node_ids(state: State<'_, Arc<AppState>>) -> Result<Vec<String>, String> {
state.storage.load_pinned_tree_node_ids().await
}
#[tauri::command]
pub async fn save_pinned_tree_node_ids(state: State<'_, Arc<AppState>>, ids: Vec<String>) -> Result<(), String> {
state.storage.save_pinned_tree_node_ids(&ids).await
}