boop (please work I cant test)

This commit is contained in:
Nuckyz 2024-07-24 15:18:24 -03:00 committed by GitHub
parent f676613173
commit 465dd15e2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View file

@ -52,7 +52,7 @@ const cl = classNameFactory("vc-plugin-modal-");
const UserSummaryItem = findComponentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers");
const AvatarStyles = findByProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
const UserRecord: Constructor<Partial<User>> = proxyLazy(() => UserStore.getCurrentUser().constructor) as any;
const UserRecord = proxyLazy<Constructor<Partial<User>>>(() => UserStore.getCurrentUser().constructor);
interface PluginModalProps extends ModalProps {
plugin: Plugin;

View file

@ -18,7 +18,7 @@ async function runReporter() {
try {
ReporterLogger.log("Starting test...");
let loadLazyChunksResolve: (value: void | PromiseLike<void>) => void;
let loadLazyChunksResolve: (value: void) => void;
const loadLazyChunksDone = new Promise<void>(r => loadLazyChunksResolve = r);
// The main patch for starting the reporter chunk loading
@ -34,9 +34,7 @@ async function runReporter() {
Vencord.Webpack._initReporter = function () {
// initReporter is called in the patched entry point of Discord
// setImmediate to only start searching for lazy chunks after Discord initialized the app
setTimeout(async () => {
loadLazyChunks().then(loadLazyChunksResolve);
}, 0);
setTimeout(() => loadLazyChunks().then(loadLazyChunksResolve), 0);
};
await loadLazyChunksDone;