Skip to content

Commit 926ff74

Browse files
committed
fix(tauri): remove 2s wait at startup
1 parent b705582 commit 926ff74

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src-tauri/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use tauri::api::process::{Command, CommandEvent};
77
use tauri::Manager;
88
use std::collections::HashMap;
9-
use std::time::Duration;
10-
use async_std::task;
9+
// use std::time::Duration;
10+
// use async_std::task;
1111

1212
fn main() {
1313
tauri::Builder::default()
@@ -106,7 +106,9 @@ fn main() {
106106
let _ = main_window.eval(&navigation_script);
107107
}
108108
if line.contains("tauri-client-ready") {
109-
task::sleep(Duration::from_secs(2)).await;
109+
// Skip waiting as the loading takes enough time
110+
// for us to see the loading screen
111+
// task::sleep(Duration::from_secs(2)).await;
110112

111113
// Apply final DPI settings before showing main window
112114
#[cfg(target_os = "macos")]

0 commit comments

Comments
 (0)