From 6982eb4fb4d44105dc8b44e898d452d4e5d32c82 Mon Sep 17 00:00:00 2001 From: "xan.lol" Date: Tue, 20 Jan 2026 21:51:23 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20add=20back=20the=20code=20that=20makes?= =?UTF-8?q?=20theming=20good=20=F0=9F=98=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit where did it go? we will never know 🤷 this makes the background and mentions fixed ✅ yay! omg git is so wacky sometimes (or maybe major VS Code merging conflicts skill issue, unsure) --- src/view/shell/index.web.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index 4bb2b81ee..f72ebd178 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -37,6 +37,7 @@ import {Composer} from './Composer.web' import {DrawerContent} from './Drawer' function ShellInner() { + const t = useTheme() const navigator = useNavigation() const closeAllActiveElements = useCloseAllActiveElements() const {state: policyUpdateState} = usePolicyUpdateContext() @@ -45,6 +46,39 @@ function ShellInner() { useComposerKeyboardShortcut() useIntentHandler() + useLayoutEffect(() => { + const rootElement = document.documentElement + rootElement.className = `html` + rootElement.style.setProperty( + 'background', + `${t.atoms.bg.backgroundColor}`, + 'important', + ) + }, [t.atoms.bg.backgroundColor, t.name]) + + useLayoutEffect(() => { + const color = t.palette.primary_500 + + const styleId = 'prosemirror-mention-color' + let style = document.getElementById(styleId) as HTMLStyleElement | null + + if (!style) { + style = document.createElement('style') + style.id = styleId + document.head.appendChild(style) + } + + style.innerHTML = ` + .ProseMirror .mention { + color: ${color} !important; + } + .ProseMirror a, + .ProseMirror .autolink { + color: ${color} !important; + } + ` + }, [t.palette.primary_500]) + useEffect(() => { const unsubscribe = navigator.addListener('state', () => { closeAllActiveElements() -- 2.51.2