Skip to content

Commit

Permalink
Fix message gradients in ConversationPanel
Browse files Browse the repository at this point in the history
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and indutny-signal committed Feb 28, 2024
1 parent 08b516b commit 274fbc4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ts/state/smart/ConversationPanel.tsx
Expand Up @@ -58,7 +58,9 @@ function doAnimate({
onAnimationStarted: () => unknown;
onAnimationDone: () => unknown;
overlay: AnimationProps<{ backgroundColor: string }>;
panel: AnimationProps<{ transform: string }>;
panel: AnimationProps<
{ transform: string } | { left: string } | { right: string }
>;
}) {
const animateNode = panel.ref.current;
if (!animateNode) {
Expand Down Expand Up @@ -176,8 +178,11 @@ export function ConversationPanel({
panel: {
ref: animateRef,
keyframes: [
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
{ transform: 'translateX(0%)' },
// Note that we can't use translateX here because it breaks
// gradients for the message in message details screen.
// See: https://issues.chromium.org/issues/327027598
isRTL ? { right: '100%' } : { left: '100%' },
isRTL ? { right: '0' } : { left: '0' },
],
},
});
Expand Down

0 comments on commit 274fbc4

Please sign in to comment.