D4koon / WhatsappTray

Minimize Whatsapp Desktop-Client to Tray
GNU General Public License v3.0
387 stars 32 forks source link

Add additional check for WhatsApp (Outdated) window title to work wit… #159

Open didster opened 1 year ago

didster commented 1 year ago

…h v2.2314.11 onwards of the desktop app

Attached PR should fix app with most recent update to the desktop version of WA v2.2314.11 which has updated the window title to "WhatApp (Outdated)". It should still work with the other version, but I cant test this as can no longer find anywhere to install it from.

Xebeth commented 1 year ago

I was going to do something similar but put the title to search for in the .ini file

didster commented 1 year ago

I was going to do something similar but put the title to search for in the .ini file

Yup that would be better - this was just a quick fix for me given I think WAT's days are numbered anyway unless it can be updated to work with the UWP version (or Meta decides to actually allow the app in the sys tray natively which I cant really believe it STILL doesn't do). Didn't seem much of a point for me to spend time doing the ini route personally - I think effort better spent making it work with the UWP version. But feel free if you have the time would 100% be a better solution given I expect the next desktop release may be titled "WhatsApp (REALLY REALLY Outdated)" lol

Xebeth commented 1 year ago

Yeah, absolutely. I mean, you saved me the effort :p Your fix is indeed good enough 👍 Hooking UWP might prove tricky as these apps are sandboxed in the AppContainer. I had a quite look to see what's possible but I haven't found anything yet. But as you say, if the devs could just implement that already, that'd be ideal... EDIT: I patched AppData\Local\WhatsApp\app-2.2314.11\resources\app.asar to change the title back to WhatsApp and your fix didn't break anything 😁

ThomasSteins commented 1 year ago

Ha, Ha, Ha! 😁 nice attempt to distract from the question that seems unsolvable at first, "how do I manage to send a UWP app to the system tray and let it remain active"... I'm afraid, as long as the whole "substructure" doesn't provide this functionality, we can completely forget any tools for "minimizing to tray"?...

didster commented 1 year ago

Ha, Ha, Ha! 😁 nice attempt to distract from the question that seems unsolvable at first, "how do I manage to send a UWP app to the system tray and let it remain active"... I'm afraid, as long as the whole "substructure" doesn't provide this functionality, we can completely forget any tools for "minimizing to tray"?...

@ThomasSteins Absolutely no attempt at distracting from anything. Simply allowing those who wish to continue to use the desktop app to do so.

Such tools are not really needed for UWP apps anyway. Most people use WAT only because they want to receive notifications for messages at all times and not have WA sit permanently in the taskbar. Yes its nice to have an icon in the tray, but that isn't the real point of WAT.

UWP apps have the ability to run in the background and dont need to be moved to the tray to do so. Unfortunately Meta's first attempt at this seems buggy which is why I created this patch - for me at least I only receive messages in 50% of the cases when the UWP app is "closed".

But for other apps it works flawlessly - like the native Win10 mail client for instance. Once Meta fix this issue which I'm sure they will, you will get notifications when the app is "closed" anyway, so there will be no need to have it in the tray via WAT or any other method.

FabianLoRs commented 5 months ago

@D4koon? 🤔