mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-10 16:27:05 +02:00
Revert "remove close_store command since we extend from Resource"
This reverts commit 4a29fc8990.
This commit is contained in:
@@ -133,6 +133,11 @@ async fn get_store<R: Runtime>(
|
||||
Ok(stores.get(&resolve_store_path(&app, path)?).copied())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn close_store<R: Runtime>(app: AppHandle<R>, rid: ResourceId) -> Result<()> {
|
||||
Ok(app.resources_table().close(rid)?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn set<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
@@ -414,8 +419,21 @@ impl Builder {
|
||||
pub fn build<R: Runtime>(self) -> TauriPlugin<R> {
|
||||
plugin::Builder::new("store")
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
load, get_store, set, get, has, delete, clear, reset, keys, values, length,
|
||||
entries, reload, save,
|
||||
load,
|
||||
get_store,
|
||||
close_store,
|
||||
set,
|
||||
get,
|
||||
has,
|
||||
delete,
|
||||
clear,
|
||||
reset,
|
||||
keys,
|
||||
values,
|
||||
length,
|
||||
entries,
|
||||
reload,
|
||||
save,
|
||||
])
|
||||
.setup(move |app_handle, _api| {
|
||||
app_handle.manage(StoreState {
|
||||
|
||||
Reference in New Issue
Block a user