Fix initializing custom themes with ThemeStore too early

This commit is contained in:
Nuckyz 2025-05-14 17:08:56 -03:00
parent 707d688887
commit c1f19d5288
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
11 changed files with 42 additions and 32 deletions

View file

@ -7,7 +7,7 @@
import { proxyLazy } from "@utils/lazy";
import { sleep } from "@utils/misc";
import { Queue } from "@utils/Queue";
import { Flux, FluxDispatcher, GuildChannelStore, PrivateChannelsStore } from "@webpack/common";
import { ChannelActionCreators, Flux, FluxDispatcher, GuildChannelStore } from "@webpack/common";
export const OnlineMemberCountStore = proxyLazy(() => {
const preloadQueue = new Queue();
@ -22,7 +22,7 @@ export const OnlineMemberCountStore = proxyLazy(() => {
async _ensureCount(guildId: string) {
if (onlineMemberMap.has(guildId)) return;
await PrivateChannelsStore.preload(guildId, GuildChannelStore.getDefaultChannel(guildId).id);
await ChannelActionCreators.preload(guildId, GuildChannelStore.getDefaultChannel(guildId).id);
}
ensureCount(guildId?: string) {