OrangeDrangon / android-messages-desktop

Android Messages as a Cross-platform Desktop App
Other
343 stars 29 forks source link

Modifying handleTrayClick to minimize when window is visible #452

Closed ben-bartholomew closed 3 months ago

ben-bartholomew commented 5 months ago

Very minor modification made to handleTrayClick to check if the window is visible before showing or hiding.

Note that the original enhancement calls for also bringing the window to the top/focus if it is hidden behind another window, but the page visibility API only allows that level of granularity (tracking if the window is occluded by another window) on macOS: https://www.electronjs.org/docs/latest/api/browser-window#page-visibility

On other platforms it will just show/hide based on minimized/visible.

Closes #412

OrangeDrangon commented 5 months ago

I'll give it a run after work.