Merge remote-tracking branch 'upstream/dev'

This commit is contained in:
thororen 2024-05-04 00:38:32 -04:00
commit 4d46994464
23 changed files with 364 additions and 95 deletions

View file

@ -22,9 +22,11 @@ import { _resolveReady, filters, findByCodeLazy, findByProps, findByPropsLazy, f
import type * as t from "./types/utils";
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();
@ -36,6 +38,8 @@ export let ComponentDispatch;
waitFor(["ComponentDispatch", "ComponentDispatcher"], m => ComponentDispatch = m.ComponentDispatch);
export const Constants = findByPropsLazy("Endpoints");
export const RestAPI: t.RestAPI = proxyLazyWebpack(() => {
const mod = findByProps("getAPIBaseURL");
return mod.HTTP ?? mod;