From 7f46ebd99adabdd34085fe965bae9ede08d21432 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 24 Jan 2023 23:13:45 +0200 Subject: [PATCH] update readme --- plugins/window-state/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/window-state/README.md b/plugins/window-state/README.md index de309e73..aa9aa865 100644 --- a/plugins/window-state/README.md +++ b/plugins/window-state/README.md @@ -39,19 +39,19 @@ Afterwards all windows will remember their state when the app is being closed an Optionally you can also tell the plugin to save the state of all open window to disk my using the `save_window_state()` method exposed by the `AppHandleExt` trait: ```rust -use tauri_plugin_window_state::AppHandleExt; +use tauri_plugin_window_state::{AppHandleExt, StateFlags}; // `tauri::AppHandle` now has the following additional method -app.save_window_state(); // will save the state of all open windows to disk +app.save_window_state(StateFlags::all()); // will save the state of all open windows to disk ``` To manually restore a windows state from disk you can call the `restore_state()` method exposed by the `WindowExt` trait: ```rust -use tauri_plugin_window_state::{WindowExt, ShowMode}; +use tauri_plugin_window_state::{WindowExt, StateFlags}; // all `Window` types now have the following additional method -window.restore_state(ShowMode::LastSaved); // will restore the windows state from disk +window.restore_state(StateFlags::all()); // will restore the windows state from disk ``` ## Contributing