diff --git a/plugins/fake-profile-themes-and-effects/src/index.ts b/plugins/fake-profile-themes-and-effects/src/index.ts index f6d74ea..4af5efb 100644 --- a/plugins/fake-profile-themes-and-effects/src/index.ts +++ b/plugins/fake-profile-themes-and-effects/src/index.ts @@ -1,4 +1,5 @@ import { logger } from "@vendetta"; +import { storage } from "@vendetta/plugin"; import { applyPatches } from "@shared/lib/patcher"; import { FluxDispatcher } from "@fpte/lib/flux"; import { UserProfileStore, UserStore } from "@fpte/lib/stores"; @@ -30,6 +31,16 @@ let unpatchAll: () => void = () => {}; export default { onLoad() { + // The "real" picker (EffectPickerActionSheet.tsx) works by manually calling Discord's own + // EditProfileEffectActionSheet as a plain function from inside this plugin's own render, + // outside React's normal reconciliation - Discord's component's hooks end up chained onto + // this fiber's hook list. If that component's own hook count/order ever varies, that's the + // "Rendered more/fewer hooks" crash class, and it's the one this plugin's own settings + // screen already had a manual override toggle for. Defaulting to the fallback picker (a + // self-contained implementation using only its own hooks) instead of opting into that risk + // by default - it's a real crash a user hit live opening the Effects picker. + storage.forceFallbackEffectPicker ??= true; + unpatchAll = applyPatches("FakeProfileThemesAndEffects", logger, { "purchase check": patchGetPurchase, "user profile data": patchGetUserProfile,