-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix Issue #16 #18
Fix Issue #16 #18
Conversation
Hey @lesthack, Looking at this PR, I'm under the impression that this will prevent multiple instances of the app from starting. That's good as that sounds like desired behavior to me. I think part of the problem in #16 is that the app itself isn't either exiting completely or is leaving behind a tray icon when it exits. If I understand the problem correctly, then this PR doesn't completely solve the issue. Nonetheless, I'm going to test this PR locally now. |
Okay so I tested this PR as it stands right now and I was right. Starting Pocket Casts works correctly with the window and tray icon coming up. Closing Pocket Casts however will close the window but leave the tray icon. Due to this PR, trying to open Pocket Casts again from the icon in the launcher doesn't work as there's still an instance running. You have to right click the tray icon and click "show". I think the desired behavior here is when closing the window, the instance should fully quit, tray icon included. |
I asked a question in the issue (#16) on what people think we should do. If the decision is to leave the tray icon around when the window is closed, then we should use this event (https://github.com/electron/electron/blob/master/docs/api/app.md#event-second-instance) to reopen the current instance when someone tries to start a second instance of the app. |
Personally, I think the desired behavior is like the PR, I mean, when you close the window, i prefer keep listening the audio without see the application. And yes, for close completely we need go to the menu in the tray icon. The only detail now, is when you close the window and after, open the app through the some launcher, the app don't recovery the last state and don't show. |
That's what minimize is for. |
I believe that closing the main window should close the app. I think it's shady to keep running in the background afterward. I'm going to merge this PR, but then do an additional PR that closes the app when the close button is clicked. Apps on Linux such as Slack or Zoom allow you to change a setting to determine whether to stay running in the background or not. Once #19 is completed, we can then have that same setting in this app. |
Fixes #16.