From e9e789be7093e8b025f606cde69b3d89760c9380 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 19 Jun 2024 16:59:40 +0200 Subject: [PATCH] fix NewGuildSettings --- src/plugins/newGuildSettings/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/newGuildSettings/index.tsx b/src/plugins/newGuildSettings/index.tsx index f1c29f25..6b9dfe35 100644 --- a/src/plugins/newGuildSettings/index.tsx +++ b/src/plugins/newGuildSettings/index.tsx @@ -19,10 +19,15 @@ import { definePluginSettings, migratePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findByCodeLazy, findByPropsLazy } from "@webpack"; +import { findByCodeLazy, findByPropsLazy, mapMangledModuleLazy } from "@webpack"; const { updateGuildNotificationSettings } = findByPropsLazy("updateGuildNotificationSettings"); -const { toggleShowAllChannels } = findByPropsLazy("toggleShowAllChannels"); +const { toggleShowAllChannels } = mapMangledModuleLazy(".onboardExistingMember(", { + toggleShowAllChannels: m => { + const s = String(m); + return s.length < 100 && !s.includes("onboardExistingMember") && !s.includes("getOptedInChannels"); + } +}); const isOptInEnabledForGuild = findByCodeLazy(".COMMUNITY)||", ".isOptInEnabled("); const settings = definePluginSettings({