feat: update setup hook to new syntax (#257)

This commit is contained in:
Lucas Fernandes Nogueira
2023-02-16 08:42:26 -08:00
committed by GitHub
parent 738636472c
commit 22f987bf24
14 changed files with 384 additions and 299 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ async fn unwatch(watchers: State<'_, WatcherCollection>, id: Id) -> Result<()> {
pub fn init<R: Runtime>() -> TauriPlugin<R> {
PluginBuilder::new("fs-watch")
.invoke_handler(tauri::generate_handler![watch, unwatch])
.setup(|app| {
.setup(|app, _api| {
app.manage(WatcherCollection::default());
Ok(())
})