v0.1.0-pre.076
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: kb-app-demo-desktop/src/splash.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
//! Splash-window payloads and startup sequencing helpers.
|
||||
|
||||
@@ -52,7 +52,7 @@ pub(crate) fn emit_splash_order(
|
||||
}
|
||||
|
||||
/// Runs the startup sequence after the splash frontend installed its listener.
|
||||
pub(crate) async fn splash_frontend_ready_inner(
|
||||
pub(crate) async fn splash_frontend_ready(
|
||||
app: tauri::AppHandle,
|
||||
window: tauri::WebviewWindow,
|
||||
state: &crate::AppState,
|
||||
@@ -120,7 +120,7 @@ pub(crate) async fn splash_frontend_ready_inner(
|
||||
std::option::Option::Some("success"),
|
||||
std::option::Option::None,
|
||||
);
|
||||
crate::wait_until_minimum(started_at, crate::SPLASH_MINIMUM_MS).await;
|
||||
wait_until_minimum(started_at, crate::SPLASH_MINIMUM_MS).await;
|
||||
crate::emit_splash_order(
|
||||
&window,
|
||||
"fadeout",
|
||||
@@ -142,7 +142,7 @@ pub(crate) async fn splash_frontend_ready_inner(
|
||||
}
|
||||
|
||||
/// Waits until the configured minimum splash duration has elapsed.
|
||||
pub(crate) async fn wait_until_minimum(start: tokio::time::Instant, minimum_ms: u64) {
|
||||
async fn wait_until_minimum(start: tokio::time::Instant, minimum_ms: u64) {
|
||||
let minimum = std::time::Duration::from_millis(minimum_ms);
|
||||
let elapsed = start.elapsed();
|
||||
if elapsed >= minimum {
|
||||
|
||||
Reference in New Issue
Block a user