chore: spawn

This commit is contained in:
lencx
2023-01-02 17:40:33 +08:00
parent 4c86477d6f
commit 53a240953f
2 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
let theme = ChatConfJson::theme();
let handle = app.app_handle();
tokio::spawn(async move {
tauri::async_runtime::spawn(async move {
window::tray_window(&handle);
});
@@ -49,7 +49,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
app.set_activation_policy(tauri::ActivationPolicy::Accessory);
} else {
let app = app.handle();
tokio::spawn(async move {
tauri::async_runtime::spawn(async move {
#[cfg(target_os = "macos")]
WindowBuilder::new(&app, "core", WindowUrl::App(url.into()))
.title("ChatGPT")