refactor(Webpack): more reliable patching (#2237)

This commit is contained in:
Nuckyz 2024-05-02 18:52:41 -03:00 committed by GitHub
parent 0a598ae966
commit a055b1d47b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 443 additions and 302 deletions

View file

@ -26,6 +26,9 @@ export let FluxDispatcher: t.FluxDispatcher;
waitFor(["dispatch", "subscribe"], m => {
FluxDispatcher = m;
// Non import call to avoid circular dependency
Vencord.Plugins.subscribeAllPluginsFluxEvents(m);
const cb = () => {
m.unsubscribe("CONNECTION_OPEN", cb);
_resolveReady();