SwiftcordApp / Swiftcord

A fully native Discord client for macOS built 100% in Swift!
https://swiftcordapp.github.io/Swiftcord/
GNU General Public License v3.0
1.93k stars 86 forks source link

[Bug]: Badge duplication & overlap #86

Closed char-ptr closed 2 years ago

char-ptr commented 2 years ago

Describe the bug

For some reason my nitro badge is being duplicated and overlapped ontop of my hypesquad badge. idk if this will occur with other badges or if it happens with a set amount etc. To Reproduce

Open a users profile who has HS balance & nitro badges

Expected behavior No duplication and or overlap Screenshots Swiftcord:

image

standard client:

image

Logs

Additional context

cryptoAlgorithm commented 2 years ago

@pozm Really sorry for not reading this issue earlier! Does this issue happen with al users with nitro and a hype squad badge, or only this particular user/combination of badges?

PS: I usually respond way faster if you ping me in the Swiftcord discord server :)

char-ptr commented 2 years ago

No problems, everyone is busy.

I've looked into it afterwards and it seems like nitro (and booster) badges only show up for the account currently logged in. So i can't really nail down which badge is actually causing it cause it shows up for no one else lol. It may be worth opening another issue about the issue i've came across though, as if you want to have 1:1 parity with std client then it will be needed.

Thank you

cryptoAlgorithm commented 2 years ago

Right. The nitro issue is something I was trying to fix, but couldn't figure out the API responsible for returning the nitro status of a user (the premium_type for other users is always nil). I unfortunately don't have nitro, so I'll most probably work with one of my contributors to squash this bug. (@Candygoblen123) Thanks for this report!

cryptoAlgorithm commented 2 years ago

@Candygoblen123 Could you take a look at this when possible? Since you have nitro, you might be able to repro this.

cryptoAlgorithm commented 2 years ago

@pozm, I figured out the cause of this. I'll see if I can fix it, but it doesn't seem like an easy fix.

cryptoAlgorithm commented 2 years ago

@pozm This is now fixed. You can grab the latest nightly version to test it out, and as always, thanks for using Swiftcord :)

Screenshot 2022-09-03 at 3 04 36 PM