noodlebox / betterdiscord-plugins

Assorted small plugins for BetterDiscord
MIT License
87 stars 125 forks source link

OwnerTag: color is that of previous server when Ctrl-Tab used #14

Closed dddlr closed 7 years ago

dddlr commented 7 years ago

The owner tag color of a user matches the role color in the previously switched-to server, instead of the current server.

Repro steps:

  1. Be in two servers where a user has different role colors in each of the two servers, or has a role color in one server but no role in the other
  2. Switch to a server of which user is not the owner ("server A")
  3. Switch to a server of which user is the owner ("server B")
  4. Owner tag has color that role of the user has in server A

Video of me switching from server A to server B, and then to a server where the user is not a member, and back to server B: https://streamable.com/b3fcm

noodlebox commented 7 years ago

I can't reproduce that here, but there was an issue like this in an older version. Is this still happening with the latest?

dddlr commented 7 years ago

Yup, I'm using the latest version (1.3.1).

I should have mentioned that I'm on Discord Canary (latest) on (Arch) Linux. After a bit more testing, it looks like I can only reproduce it if I'm using the Ctrl-Tab/Ctrl-Shift-Tab shortcuts to switch between server A and server B.

noodlebox commented 7 years ago

Aha, I can reproduce it now using that hotkey across several versions of Discord. There's a delay between the updating of the selected guild and the updating of the member list, but only when using that specific hotkey.

It's a weird edge case, but it shouldn't be too hard to fix here.

noodlebox commented 7 years ago

Let me know if this fixes it for you: https://github.com/noodlebox/betterdiscord-plugins/blob/fix-tag-color/OwnerTag.plugin.js

dddlr commented 7 years ago

LGTM.