tomer8007 / whatsapp-web-incognito

A Chrome extension that disables read receipts and presence updates on WhatsApp Web
MIT License
312 stars 74 forks source link

Restored messages are in black text on black text bubble in dark mode #86

Closed FieryRMS closed 2 years ago

FieryRMS commented 2 years ago

When the messages are restored, the text is black, so is the message bubble in dark mode. This makes it almost impossible to see. image image

tomer8007 commented 2 years ago

This seems to be happening only when you change the theme after the message is loaded. If you refresh the page, it's in the correct color.

FieryRMS commented 2 years ago

I have always been using the dark mode, I noticed this a couple of times and reported it yesterday. I refreshed the page and it still happens.

tomer8007 commented 2 years ago

Here is the code that's supposed to pick the right color: https://github.com/tomer8007/whatsapp-web-incognito/blob/9b1f37dd00f8d2bc98422c8be2750f4dee9cc99d/core/ui.js#L501 You can put a breakpoint on this line and see what color it outputs when you load a deleted message. This is an unfortunate solution, but I can't debug a bug that I can't reproduce myself.

FieryRMS commented 2 years ago

it seems that localStorage["theme"] returns undefined for me, which is what is causing the issue. Running localStorage["theme"]="\"dark\"" fixes the issue for me. Is this an issue caused by WhatsApp not setting the theme variable?

tomer8007 commented 2 years ago

Yes, it appears that this variable is only set when you change the theme in the settings. Should be fixed now.