Page MenuHomePhabricator

D14122.diff
No OneTemporary

D14122.diff

diff --git a/native/chat/text-message-tooltip-button.react.js b/native/chat/text-message-tooltip-button.react.js
--- a/native/chat/text-message-tooltip-button.react.js
+++ b/native/chat/text-message-tooltip-button.react.js
@@ -1,7 +1,11 @@
// @flow
import * as React from 'react';
-import Animated, { type SharedValue } from 'react-native-reanimated';
+import Animated, {
+ type SharedValue,
+ useAnimatedStyle,
+ interpolate,
+} from 'react-native-reanimated';
import { chatMessageItemHasEngagement } from 'lib/shared/chat-message-item-utils.js';
import {
@@ -26,7 +30,7 @@
import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
import type { TooltipRoute } from '../tooltip/tooltip.react.js';
-const { Node, interpolateNode, Extrapolate } = Animated;
+const { Node, Extrapolate } = Animated;
type Props = {
+navigation: AppNavigationProp<'TextMessageTooltipModal'>,
@@ -60,13 +64,14 @@
targetInputBarHeight: sidebarInputBarHeight,
});
- const headerStyle = React.useMemo(() => {
+ const headerStyle = useAnimatedStyle(() => {
const bottom = initialCoordinates.height;
- const opacity = interpolateNode(progress, {
- inputRange: [0, 0.05],
- outputRange: [0, 1],
- extrapolate: Extrapolate.CLAMP,
- });
+ const opacity = interpolate(
+ progressV2.value,
+ [0, 0.05],
+ [0, 1],
+ Extrapolate.CLAMP,
+ );
return {
opacity,
position: 'absolute',
@@ -74,7 +79,7 @@
width: windowWidth,
bottom,
};
- }, [initialCoordinates.height, initialCoordinates.x, progress, windowWidth]);
+ }, [initialCoordinates.height, initialCoordinates.x, windowWidth]);
const messagePressResponderContext = React.useMemo(
() => ({

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 12:38 AM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2674076
Default Alt Text
D14122.diff (1 KB)

Event Timeline