Skip to main content

Mountain/Command/TreeView/
PersistTreeView.rs

1#![allow(non_snake_case)]
2
3//! Tauri command - serialise tree-view state (expansion, selection,
4//! scroll position) for cross-session restore.
5//!
6//! TODO: stub. Wire `PersistTreeViewState` into the
7//! `CommonTreeViewProvider` trait; persist to workspace storage or
8//! `ApplicationState` so `RestoreTreeView` (sibling) can reapply.
9
10use std::sync::Arc;
11
12use serde_json::{Value, json};
13use tauri::{AppHandle, State, Wry, command};
14
15use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
16
17#[command]
18pub async fn PersistTreeView(
19	_ApplicationHandle:AppHandle<Wry>,
20	_State:State<'_, Arc<ApplicationState>>,
21	_ViewId:String,
22) -> Result<Value, String> {
23	dev_log!("commands", "warn: PersistTreeView not implemented");
24	Ok(json!({ "success": false, "error": "PersistTreeViewState method not implemented" }))
25}