mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-15 05:31:42 +03:00
feat(core): run cleanup code on the relaunch API (#3629)
This commit is contained in:
parent
5293445f08
commit
9c65abce1b
5
.changes/api-relaunch-cleanup.md
Normal file
5
.changes/api-relaunch-cleanup.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Run `AppHandle` cleanup code before restarting the application on the `process > relaunch` API.
|
@ -23,7 +23,7 @@ pub enum Cmd {
|
||||
impl Cmd {
|
||||
#[module_command_handler(process_relaunch, "process > relaunch")]
|
||||
fn relaunch<R: Runtime>(context: InvokeContext<R>) -> super::Result<()> {
|
||||
crate::api::process::restart(&context.window.state());
|
||||
context.window.app_handle().restart();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user