OrangeDrangon / android-messages-desktop

Android Messages as a Cross-platform Desktop App
Other
312 stars 27 forks source link

Tray icon disappearing randomly in Windows 11 #365

Closed smikwily closed 1 year ago

smikwily commented 2 years ago

Describe the bug Wndows 11 (possibly 10 as well) tray icon disappearing

To Reproduce I'm honestly not sure. I don't know if it is after coming back from a system lock or just a certain period of time. I haven't been able to narrow it down.

Expected behavior Once the setting is enabled, I would think it would be in the dock no matter what and as long at the app is running.

Screenshots n/a

Desktop (please complete the following information):

Additional context I'm seeing this on both my work laptop (W11) and my personal desktop (W11 as well). If you disable and enable the setting, the icon comes back. It will then randomly disappear again.


Let me know if I can supply you with any additional information. I only notice it is missing when I either see a new message in on my phone and go to check it on my desktop or am checking to see if I have a message that I was expecting. I usually check the notification dot on the tray icon, but sometimes it just isn't there and I never fully close it.

I do have both the options Enable Tray Icon and Show Icons in Menu Tray enabled, though I'm not 100% what the difference is or if that could be part of the problem.

LSeelig commented 2 years ago

I can reproduce this. On my PC, for the icon to disappear from the tray, it must be opened (from taskbar, start, desktop, shortcut, or exe) while it is already running. If the tray icon has already been vanished due to said issue, it will continue to run in the background until it is quitted from the app's menu bar or the task manager. If the app is opened while this is still true, the window opens properly, but the tray icon will reappear and instantly disappear.

If the app is running in the foreground or minimized (minimized != closed to tray, indicator is still present under taskbar icon), clicking the taskbar shortcut won't trigger the tray icon to disappear. This is because clicking the taskbar of an active app toggles minimizing/un-minimizing the app instead of trying to open it. Opening it in any of the other ways still breaks the tray icon.

The bug only seems to affect the tray icon, as the app still runs and receives notifications in the background once the icon's broken. The icon can only be restored by toggling off and on menu bar -> settings -> Enable Tray Icon or force quitting and reopening the app.

I'm not an expert, but I'd suggest that something about opening the app interferes with the tray icon if it already is present.

smikwily commented 2 years ago

This was working for a while, but is acting up again.

OrangeDrangon commented 2 years ago

I can reproduce this. On my PC, for the icon to disappear from the tray, it must be opened (from taskbar, start, desktop, shortcut, or exe) while it is already running. If the tray icon has already been vanished due to said issue, it will continue to run in the background until it is quitted from the app's menu bar or the task manager. If the app is opened while this is still true, the window opens properly, but the tray icon will reappear and instantly disappear.

If the app is running in the foreground or minimized (minimized != closed to tray, indicator is still present under taskbar icon), clicking the taskbar shortcut won't trigger the tray icon to disappear. This is because clicking the taskbar of an active app toggles minimizing/un-minimizing the app instead of trying to open it. Opening it in any of the other ways still breaks the tray icon.

The bug only seems to affect the tray icon, as the app still runs and receives notifications in the background once the icon's broken. The icon can only be restored by toggling off and on menu bar -> settings -> Enable Tray Icon or force quitting and reopening the app.

I'm not an expert, but I'd suggest that something about opening the app interferes with the tray icon if it already is present.

I did not realize this issue had actually had some work done to figure out why it was happening maybe I can fix it this weekend now.

OrangeDrangon commented 1 year ago

This has been potentially fixed by #396. I will publish a 5.4.0 today. please let me know if this is not happening anymore so I can close this

Liam-Twomey commented 1 year ago

I am still having this issue on the 5.4.0 release (installed via Scoop) on Windows 11 build 22H2, exactly as originally described by @smikwily.

innesst commented 1 year ago

I cannot reproduce by trying to start the exe while it is already running. If I run the exe, it does nothing if the window is minimized to taskbar, or restores it if minimized to tray. Installed by download from GitHub

smikwily commented 1 year ago

This appears to be resolved now, at least for me. I think it is OK to close.

@Liam-Twomey and @innesst - are you still having issues or is this fixed now for you as well?