replit / desktop

Replit Desktop App
116 stars 7 forks source link

Don't reset last open repl on window close #93

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

Realized that we don't want to actually reset the last open repl state here when the window is closed especially now that we handle the focus event: https://github.com/replit/desktop/pull/88

This is because, on Windows and Linux, the most common way to exit the application is to close the window (as opposed to Mac where you might hit Cmd+Q instead which doesn't fire this event) which means the last open repl is never restored in practice.

Instead, the current logic that listens to transition and focus events should be sufficient.

What changed

Don't reset last open repl on window close

Test plan

Should be able to close the last window of the app in Windows and Linux and see the last open repl restored.