Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: saving the open/close state #48

Open
warpdesign opened this issue May 6, 2019 · 0 comments
Open

Suggestion: saving the open/close state #48

warpdesign opened this issue May 6, 2019 · 0 comments

Comments

@warpdesign
Copy link

warpdesign commented May 6, 2019

Use case: an app may have opened different windows which the user may close.

When re-launching the app, only windows that were opened when the app exited should be re-opened.

Having an additional property isOpen (that defaults to true) in the window state would fix the problem. Closing a specific window would set state.isOpen to false.

Code like this could be used:

const userListState = windowStateKeeper({
    file: 'userList'
  });

// only open userList window if it was previously opened
if (userListSate.isOpen) {
    const userListWindow = new BrowserWindow();
    // ...
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant