minimal-twitter icon indicating copy to clipboard operation
minimal-twitter copied to clipboard

Add option to hide the notification count in the twitter title

Open noopnoop opened this issue 3 years ago • 1 comments

The purpose of this PR is to hide the notification count in the title of twitter. It's a setting that can be set to true (DO hide notifications) or false (DON'T hide them).

If you refresh the page, it works just as you'd expect. However, if you're on the page and change the setting, things get a little complicated. There's 3 implementations I could think of-

  1. Switching from true->false requires a refresh, switching from false->true kicks in immediately. This is what I went with. The user can see right away when they switch from false to true that it's working. If they switch from true to false, then it kind of just reads as "I don't have any new notifications."

  2. Switching from true->false requires a refresh to kick in, switching from false->true requires a refresh to kick in. This feels worse than number 1, however it would be more consistent.

  3. Everything kicks in immediately. While this is ideal, to make the true->false case work dynamically you'd need to keep track of the notification count as the user is browsing twitter. At the very least you'd have to make a couple new global objects that communicate with main.js/changeTitleNotifications, I think. It would be pretty messy and doesn't really feel worth it.

noopnoop avatar Mar 02 '22 23:03 noopnoop

https://github.com/thomaswang/minimal-twitter/discussions/101

thomaswangarchive avatar Apr 12 '22 23:04 thomaswangarchive

https://github.com/typefully/minimal-twitter/pull/141/commits/9f7c6467afebec3402195799b39462a80a8f6c2e — finally landing this, thanks for helping @noopnoop!

thomaswangarchive avatar Jan 09 '23 02:01 thomaswangarchive

np :)

noopnoop avatar Jan 12 '23 21:01 noopnoop