chore: optim

This commit is contained in:
lencx
2022-12-29 19:29:33 +08:00
parent 9a9fb24de8
commit f1fa859961
6 changed files with 9 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
let theme = ChatConfJson::theme();
let handle = app.app_handle();
std::thread::spawn(move || {
tokio::spawn(async move {
window::tray_window(&handle);
});
@@ -43,7 +43,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();
std::thread::spawn(move || {
tokio::spawn(async move {
#[cfg(target_os = "macos")]
WindowBuilder::new(&app, "core", WindowUrl::App(url.into()))
.title("ChatGPT")