Keep reply bars and quote patterns in a chat's own theme
Outgoing replies and quotes in a chat with its own theme were drawn in the app theme's outgoing colour. The stripe templates behind --peer-border-background (--message-out-peer-N-border-background and the rest) were set on <html> as var(--message-out-primary-color), and a var() is substituted where the property is declared, so the chat container inherited a colour already resolved against the app theme. They are now declared on every element that carries a theme (:root, .night, .chat), and so is the --peer-color-rgb fallback. The background-emoji pattern of replies and link previews was painted into a canvas with the root's outgoing colour. It is a mask now, drawn once per emoji and tinted in CSS with the colour of the box it sits in, so it follows the chat's theme and a day/night switch without being redrawn. This is what tdesktop, Android and iOS do: a user's own colour is never tinted by a chat theme, and an outgoing bubble paints the author's stripe pattern in the theme's outgoing colour. That stripe count ignored collectible colours (one stripe, from id % 7); it now comes from the collectible's strip, the dark one at night, as tdesktop's collectiblePatternIndex does. My own colour's stripes are recomputed when my user changes instead of only at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
E
Eduard Kuzmenko committed
73ebb2fe260bdd54b7ea7245443e95fb258b6adc
Parent: 36d1db9