mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-08 14:03:53 +02:00
@@ -77,19 +77,6 @@ async fn get_store<R: Runtime>(app: AppHandle<R>, path: PathBuf) -> Option<Resou
|
||||
stores.get(&path).copied()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn get_or_create_store<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
path: PathBuf,
|
||||
auto_save: Option<AutoSave>,
|
||||
) -> Result<ResourceId> {
|
||||
if let Some(rid) = get_store(app.clone(), path.clone()).await {
|
||||
Ok(rid)
|
||||
} else {
|
||||
create_store(app, path, auto_save).await
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn set<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
@@ -245,7 +232,6 @@ impl<R: Runtime> Builder<R> {
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
create_store,
|
||||
get_store,
|
||||
get_or_create_store,
|
||||
set,
|
||||
get,
|
||||
has,
|
||||
|
||||
Reference in New Issue
Block a user