Skip to content

Commit

Permalink
fix(docs): Add window arg in splashscreen example, closes #1572
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Sep 27, 2023
1 parent a9d5254 commit 69718c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guides/features/splashscreen.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Now, your main window will be hidden and the splashscreen window will show when
If you are waiting for your web code, you'll want to create a `close_splashscreen` [command](command).

```rust src-tauri/main.rs
use tauri::Manager;
use tauri::{Manager, Window};
// Create the command:
// This command must be async so that it doesn't run on the main thread.
#[tauri::command]
async fn close_splashscreen() {
async fn close_splashscreen(window: Window) {
// Close splashscreen
window.get_window("splashscreen").expect("no window labeled 'splashscreen' found").close().unwrap()
// Show main window
Expand Down Expand Up @@ -82,6 +82,7 @@ If you are waiting for Rust code to run, put it in the `setup` function handler

```rust src-tauri/main.rs
use tauri::Manager;

fn main() {
tauri::Builder::default()
.setup(|app| {
Expand Down

0 comments on commit 69718c8

Please sign in to comment.