feat(window-state): support using a custom filename (#1138)

* feat(window-state): support using a custom filename

ref: https://github.com/tauri-apps/plugins-workspace/pull/1079

* generate api

* fmt
This commit is contained in:
Amr Bashir
2024-04-03 21:29:48 +02:00
committed by GitHub
parent f9bcc1c21d
commit 0e9541fe89
6 changed files with 53 additions and 6 deletions
+7 -1
View File
@@ -38,5 +38,11 @@ async function restoreState(
async function restoreStateCurrent(flags: StateFlags): Promise<void> {
return restoreState(getCurrent().label, flags);
}
/**
* Get the name of the file used to store window state.
*/
async function filename(): Promise<string> {
return invoke("plugin:window-state|filename");
}
export { restoreState, restoreStateCurrent, saveWindowState };
export { restoreState, restoreStateCurrent, saveWindowState, filename };