Fix message gradients in ConversationPanel
This commit is contained in:
parent
47272bef7d
commit
2f7f94b144
1 changed files with 8 additions and 3 deletions
|
@ -58,7 +58,9 @@ function doAnimate({
|
||||||
onAnimationStarted: () => unknown;
|
onAnimationStarted: () => unknown;
|
||||||
onAnimationDone: () => unknown;
|
onAnimationDone: () => unknown;
|
||||||
overlay: AnimationProps<{ backgroundColor: string }>;
|
overlay: AnimationProps<{ backgroundColor: string }>;
|
||||||
panel: AnimationProps<{ transform: string }>;
|
panel: AnimationProps<
|
||||||
|
{ transform: string } | { left: string } | { right: string }
|
||||||
|
>;
|
||||||
}) {
|
}) {
|
||||||
const animateNode = panel.ref.current;
|
const animateNode = panel.ref.current;
|
||||||
if (!animateNode) {
|
if (!animateNode) {
|
||||||
|
@ -176,8 +178,11 @@ export function ConversationPanel({
|
||||||
panel: {
|
panel: {
|
||||||
ref: animateRef,
|
ref: animateRef,
|
||||||
keyframes: [
|
keyframes: [
|
||||||
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
|
// Note that we can't use translateX here because it breaks
|
||||||
{ transform: 'translateX(0%)' },
|
// 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' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue