From 299005f0624ad785abce2470c2c64c91f3390a1e Mon Sep 17 00:00:00 2001 From: Ally Founder Date: Sun, 2 Aug 2026 14:10:27 -0400 Subject: [PATCH] Key Inspector: add ~30 checks for the 6 regressed plugins; ServerDrawer: server-name labels + hide-DM toggle --- plugins/key-inspector/src/lib/checks.ts | 30 ++++++++++- .../src/components/GuildItem.tsx | 52 ++++++++++++++++--- .../src/components/ServerDrawerSheet.tsx | 6 ++- plugins/server-drawer/src/ui/Settings.tsx | 12 +++++ 4 files changed, 91 insertions(+), 9 deletions(-) diff --git a/plugins/key-inspector/src/lib/checks.ts b/plugins/key-inspector/src/lib/checks.ts index 8fed8d9..0417f2a 100644 --- a/plugins/key-inspector/src/lib/checks.ts +++ b/plugins/key-inspector/src/lib/checks.ts @@ -1,4 +1,4 @@ -import { find, findByName, findByProps, findByStoreName, findByTypeNameAll } from "@vendetta/metro"; +import { find, findByName, findByProps, findByPropsAll, findByStoreName, findByTypeNameAll } from "@vendetta/metro"; import { semanticColors, rawColors } from "@vendetta/ui"; export interface CheckResult { @@ -38,11 +38,13 @@ const CHECKS: Check[] = [ { label: 'find(resolveSemanticColor via meta)', run: () => find((m: any) => m?.meta?.resolveSemanticColor) }, // PronounDB + { label: 'find(UserProfileContent)', run: () => find((m: any) => m?.type?.name === "UserProfileContent") }, { label: 'find(UserProfile)', run: () => find((m: any) => m?.type?.name === "UserProfile") }, { label: 'findByName("UserProfileSection", false)', run: () => findByName("UserProfileSection", false) }, // Message Snippets / Reminders / Urban Dictionary { label: 'findByProps("sendMessage", "sendBotMessage")', run: () => findByProps("sendMessage", "sendBotMessage") }, + { label: 'findByProps("sendBotMessage") (single prop, matches Revenge core)', run: () => findByProps("sendBotMessage") }, // ViewRaw { label: 'findByProps("openLazy", "hideActionSheet")', run: () => findByProps("openLazy", "hideActionSheet") }, @@ -53,6 +55,7 @@ const CHECKS: Check[] = [ // CopyRoleColor { label: 'findByName("ThemedRolePill", false)', run: () => findByName("ThemedRolePill", false) }, + { label: 'findByName("RolePill", false)', run: () => findByName("RolePill", false) }, // FakeProfileThemesAndEffects (in progress) { label: 'findByProps("saveProfileChanges")', run: () => findByProps("saveProfileChanges") }, @@ -60,6 +63,31 @@ const CHECKS: Check[] = [ { label: 'findByProps("useThemeContext")', run: () => findByProps("useThemeContext") }, { label: 'findByProps("getProfileTheme")', run: () => findByProps("getProfileTheme") }, { label: 'findByProps("ThemeContextProvider")', run: () => findByProps("ThemeContextProvider") }, + { label: 'findByName("ProfileEffectRecord", false)', run: () => findByName("ProfileEffectRecord", false) }, + { label: 'findByStoreName("UserProfileStore")', run: () => findByStoreName("UserProfileStore") }, + { label: 'findByStoreName("CollectiblesPurchaseStore")', run: () => findByStoreName("CollectiblesPurchaseStore") }, + { label: 'findByStoreName("ProfileEffectStore")', run: () => findByStoreName("ProfileEffectStore") }, + { label: 'findByName("GuildProfileEditForm", false) (currently dead/unused patch)', run: () => findByName("GuildProfileEditForm", false) }, + { label: 'findByName("UserProfileEditForm", false)', run: () => findByName("UserProfileEditForm", false) }, + { label: 'findByName("useProfileTheme", false)', run: () => findByName("useProfileTheme", false) }, + { label: 'findByName("useProfileThemeColors", false)', run: () => findByName("useProfileThemeColors", false) }, + { label: 'findByPropsAll("NONE_ITEM")', run: () => findByPropsAll("NONE_ITEM") }, + { label: 'findByProps("Radius")', run: () => findByProps("Radius") }, + { label: 'findByProps("Spacing")', run: () => findByProps("Spacing") }, + { label: 'findByProps("SafeAreaContext")', run: () => findByProps("SafeAreaContext") }, + { label: 'findByName("useWindowDimensions")', run: () => findByName("useWindowDimensions") }, + { label: 'findByProps("IconSizes")', run: () => findByProps("IconSizes") }, + { label: 'findByName("FlashList")', run: () => findByName("FlashList") }, + { label: 'findByProps("Svg")', run: () => findByProps("Svg") }, + { label: 'findByProps("PressableOpacity")', run: () => findByProps("PressableOpacity") }, + { label: 'findByProps("TextStyleSheet")', run: () => findByProps("TextStyleSheet") }, + { label: 'findByProps("BottomSheet")', run: () => findByProps("BottomSheet") }, + { label: 'findByProps("ActionSheet")', run: () => findByProps("ActionSheet") }, + { label: 'findByProps("BottomSheetScrollView")', run: () => findByProps("BottomSheetScrollView") }, + { label: 'findByProps("showActionSheet")', run: () => findByProps("showActionSheet") }, + { label: 'findByName("EditProfileEffectActionSheet")', run: () => findByName("EditProfileEffectActionSheet") }, + { label: 'findByName("showCustomColorPickerActionSheet")', run: () => findByName("showCustomColorPickerActionSheet") }, + { label: 'findByProps("triggerHapticFeedback")', run: () => findByProps("triggerHapticFeedback") }, // Color tokens referenced by FPTE specifically { label: 'semanticColors.HEADER_SECONDARY', run: () => semanticColors?.HEADER_SECONDARY }, diff --git a/plugins/server-drawer/src/components/GuildItem.tsx b/plugins/server-drawer/src/components/GuildItem.tsx index b2b9980..c2820ee 100644 --- a/plugins/server-drawer/src/components/GuildItem.tsx +++ b/plugins/server-drawer/src/components/GuildItem.tsx @@ -7,7 +7,7 @@ import { showToast } from "@vendetta/ui/toasts"; import { lazy } from "../lib/lazy"; import { rawFindByStoreName } from "../lib/rawFind"; import { getFlux, getHaptic, getBulkAckMod, getReadStateTypesMod } from "../lib/commonModules"; -import { GuildNode } from "../utils/theme"; +import { GuildNode, useTheme } from "../utils/theme"; import GuildIcon from "./GuildIcon"; import { ContextMenuModal, ContextMenuItem } from "./ContextMenuModal"; @@ -104,6 +104,30 @@ function Badge({ guildId }: { guildId: string }) { return null; } +function GuildLabel({ guildId }: { guildId: string }) { + useProxy(storage); + const theme = useTheme(); + + const Flux = getFlux(); + const GuildStore = getGuildStore(); + + // Same reasoning as GuildIcon: guild data streams in progressively after connect, so this + // subscribes rather than reading the name once at mount. + const name = Flux?.useStateFromStores?.( + [GuildStore], + () => GuildStore?.getGuild?.(guildId)?.name ?? "", + [guildId], + ) ?? ""; + + if (storage.showGuildNames === false || !name) return null; + + return ( + + {name} + + ); +} + export default function GuildItem({ node, onPick }: { node: GuildNode; onPick: (id: string) => void }) { const viewRef = React.useRef(null); const scale = React.useRef(new Animated.Value(1)).current; @@ -165,11 +189,14 @@ export default function GuildItem({ node, onPick }: { node: GuildNode; onPick: ( onLongPress={handleLongPress} delayLongPress={500} > - - - - - + + + + + + + + { const haptic = getHaptic(); haptic?.triggerHapticFeedback?.(haptic.HapticFeedbackTypes.SOFT); @@ -132,7 +136,7 @@ export default function ServerDrawerSheet({ gestureContext }: { gestureContext: style={[st.grid, { paddingHorizontal: padX, gap: GAP }]} onLayout={onLayout} > - + {!storage.hideDmTile && } {nodes.map((node) => node.type === "folder" ? diff --git a/plugins/server-drawer/src/ui/Settings.tsx b/plugins/server-drawer/src/ui/Settings.tsx index 1006d51..89783e8 100644 --- a/plugins/server-drawer/src/ui/Settings.tsx +++ b/plugins/server-drawer/src/ui/Settings.tsx @@ -35,6 +35,18 @@ export default function Settings() { value={storage.showUnreadBadges !== false} onValueChange={(v: boolean) => { storage.showUnreadBadges = v; }} /> + { storage.showGuildNames = v; }} + /> + { storage.hideDmTile = v; }} + />