mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-08 14:03:53 +02:00
Clean up
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use serde_json::json;
|
||||
use tauri::Listener;
|
||||
use tauri_plugin_store::StoreExt;
|
||||
@@ -19,13 +17,7 @@ fn main() {
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.setup(|app| {
|
||||
// Init store and load it from disk
|
||||
let store = app
|
||||
.handle()
|
||||
.store_builder("settings.json")
|
||||
.auto_save(Duration::from_millis(100))
|
||||
.build()
|
||||
.unwrap();
|
||||
app.share_store(store.clone());
|
||||
let store = app.handle().store_builder("settings.json").build().unwrap();
|
||||
app.listen("store://change", |event| {
|
||||
dbg!(event);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user