diegoberaldin / RaccoonForLemmy

A Kotlin Multiplatform client for Lemmy
https://diegoberaldin.github.io/RaccoonForLemmy/
GNU General Public License v3.0
110 stars 8 forks source link

fix: moderator and admin indicators #1058

Closed diegoberaldin closed 3 days ago

diegoberaldin commented 4 days ago

This PR solves the bug due to which "M" and "A" indicators were not displayed in comment headers in post detail screen.

Unfortunately, this was not a simple bug (and the "A" indicator had to be implemented from scratch), but as soon as I started looking into it I opened a Pandora's box because:

This PR puts a remedy to all that, centralizing all checks in a single component (LemmyValueCache) and querying it, plus determining correctly whether a user is an admin or a mod.