estroBiologist / pluralchum

PluralKit integration for BetterDiscord
MIT License
41 stars 11 forks source link

Improve responsiveness #32

Closed ariagivens closed 10 months ago

ariagivens commented 11 months ago

This PR contains all the refactoring and other minor improvements that were preparation for using API-based servernames #29. Since we can't use that unless the PK API is changed to allow systems to view the guild settings of other systems, this is what is left that is still useful.

From discussing with the PK developers, it seems that it would take significant changes to allow access in the way that we need while respecting the privacy issues that arise.

With that said, this does contain some nice improvements. Using react hooks, messages get re-rendered whenever a change occurs to a profile in the cache or settings get updated. It should solve #6. In addition I think that the async/promise based code is easier to follow than all the nested callbacks.

ariagivens commented 10 months ago

It turns out that my implementation for API based servernames is pretty close to what you need for role colors #3. So I went ahead and added that. I also add a fun little spinner animation while waiting for requests to complete.

ariagivens commented 10 months ago

Also, we should bump the version number in src/header.js and package.json.