Skip to content

Commit 9c65abc

Browse files
authored
feat(core): run cleanup code on the relaunch API (#3629)
1 parent 5293445 commit 9c65abc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changes/api-relaunch-cleanup.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Run `AppHandle` cleanup code before restarting the application on the `process > relaunch` API.

core/tauri/src/endpoints/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub enum Cmd {
2323
impl Cmd {
2424
#[module_command_handler(process_relaunch, "process > relaunch")]
2525
fn relaunch<R: Runtime>(context: InvokeContext<R>) -> super::Result<()> {
26-
crate::api::process::restart(&context.window.state());
26+
context.window.app_handle().restart();
2727
Ok(())
2828
}
2929

0 commit comments

Comments
 (0)