fix windows startup crash (rookie mistake)

This commit is contained in:
2026-09-03 22:08:48 +08:00
parent 0cad78718a
commit 0c1440f926
5 changed files with 17 additions and 11 deletions
+5 -5
View File
@@ -2,7 +2,7 @@ use tauri::{AppHandle, Manager, WebviewUrl};
const WINDOW_LABEL: &str = "onboarding";
fn show(handle: &AppHandle, accessibility_only: bool) -> Result<(), String> {
async fn show(handle: &AppHandle, accessibility_only: bool) -> Result<(), String> {
if let Some(window) = handle.get_webview_window(WINDOW_LABEL) {
if accessibility_only {
window
@@ -44,10 +44,10 @@ fn show(handle: &AppHandle, accessibility_only: bool) -> Result<(), String> {
Ok(())
}
pub fn show_initial(handle: &AppHandle) -> Result<(), String> {
show(handle, false)
pub async fn show_initial(handle: &AppHandle) -> Result<(), String> {
show(handle, false).await
}
pub fn show_accessibility_page(handle: &AppHandle) -> Result<(), String> {
show(handle, true)
pub async fn show_accessibility_page(handle: &AppHandle) -> Result<(), String> {
show(handle, true).await
}
+1 -1
View File
@@ -9,7 +9,7 @@ struct SplashscreenState {
opened_at: Instant,
}
pub fn open(handle: &AppHandle) -> Result<(), String> {
pub async fn open(handle: &AppHandle) -> Result<(), String> {
tauri::WebviewWindowBuilder::new(handle, WINDOW_LABEL, WebviewUrl::App("/splash.html".into()))
.title("Friendolls")
.inner_size(500.0, 290.0)