Skip to content

Commit

Permalink
fix: reload now just relaunches the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed May 15, 2023
1 parent 3f7f02d commit 4793f61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tauri-build = { version = "1.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.1", features = ["dialog-all", "fs-all", "http-request", "os-all", "path-all", "process-exit", "protocol-all", "reqwest-client", "shell-open", "updater", "window-all"] }
tauri = { version = "1.1", features = ["dialog-all", "fs-all", "http-request", "os-all", "path-all", "process-exit", "process-relaunch", "protocol-all", "reqwest-client", "shell-open", "updater", "window-all"] }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
chrono = "0.4.23"
home = "0.5.4"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"process": {
"all": false,
"exit": true,
"relaunch": false,
"relaunch": true,
"relaunchDangerousAllowSymlinkMacos": false
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/lib/controllers/AppController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
import { dialog, fs, http } from "@tauri-apps/api";
import { dialog, fs, http, process } from "@tauri-apps/api";
import { ToastController } from "./ToastController";
import { SettingsManager } from "../utils/SettingsManager";
import { LogController } from "./LogController";
Expand Down Expand Up @@ -817,7 +817,7 @@ export class AppController {
*/
static async reload(): Promise<void> {
LogController.log(`Reloading...`);
await AppController.init();
await process.relaunch();
}

/**
Expand Down

0 comments on commit 4793f61

Please sign in to comment.