refactor(updater): migrate to tauri's new resource table (#899)

* refactor(updater): migrate to tauri's new resource table

* fmt

* fmt

* Create updater-js-started-event.md
This commit is contained in:
Amr Bashir
2024-01-18 12:48:44 +01:00
committed by GitHub
parent 8505a756b5
commit 0879a87a7e
8 changed files with 58 additions and 46 deletions
-4
View File
@@ -14,7 +14,6 @@
)]
use tauri::{
async_runtime::Mutex,
plugin::{Builder as PluginBuilder, TauriPlugin},
Manager, Runtime,
};
@@ -28,8 +27,6 @@ pub use config::Config;
pub use error::{Error, Result};
pub use updater::*;
struct PendingUpdate(Mutex<Option<Update>>);
/// Extension trait to use the updater on [`tauri::App`], [`tauri::AppHandle`] and [`tauri::Window`].
pub trait UpdaterExt<R: Runtime> {
/// Gets the updater builder to build and updater
@@ -145,7 +142,6 @@ impl Builder {
config.installer_args = installer_args;
}
app.manage(UpdaterState { target, config });
app.manage(PendingUpdate(Default::default()));
Ok(())
})
.invoke_handler(tauri::generate_handler![