From 9aa3f380333e9bf9f170126c8bd7de94400c4e61 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 6 Dec 2025 02:41:37 +0100 Subject: [PATCH] PreviewMessage, SendTimestamps: add chat bar button in split view --- src/api/ChatButtons.tsx | 5 +++-- src/plugins/previewMessage/index.tsx | 7 +++---- src/plugins/sendTimestamps/index.tsx | 4 ++-- src/plugins/translate/TranslateIcon.tsx | 4 ++-- src/plugins/translate/settings.ts | 5 ----- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/api/ChatButtons.tsx b/src/api/ChatButtons.tsx index 52052a528..c2a1a1982 100644 --- a/src/api/ChatButtons.tsx +++ b/src/api/ChatButtons.tsx @@ -79,7 +79,7 @@ export interface ChatBarProps { }; } -export type ChatBarButtonFactory = (props: ChatBarProps & { isMainChat: boolean; }) => JSX.Element | null; +export type ChatBarButtonFactory = (props: ChatBarProps & { isMainChat: boolean; isAnyChat: boolean; }) => JSX.Element | null; export type ChatBarButtonData = { render: ChatBarButtonFactory; /** @@ -98,13 +98,14 @@ const logger = new Logger("ChatButtons"); function VencordChatBarButtons(props: ChatBarProps) { const { chatBarButtons } = useSettings(["uiElements.chatBarButtons.*"]).uiElements; + const { analyticsName } = props.type; return ( <> {Array.from(ChatBarButtonMap) .filter(([key]) => chatBarButtons[key]?.enabled !== false) .map(([key, { render: Button }]) => ( logger.error(`Failed to render ${key}`, e.error)}> -