Page MenuHomePhabricator

D7010.diff
No OneTemporary

D7010.diff

diff --git a/native/chat/multimedia-message-tooltip-button.react.js b/native/chat/multimedia-message-tooltip-button.react.js
--- a/native/chat/multimedia-message-tooltip-button.react.js
+++ b/native/chat/multimedia-message-tooltip-button.react.js
@@ -10,10 +10,7 @@
import { TooltipInlineEngagement } from './inline-engagement.react.js';
import { InnerMultimediaMessage } from './inner-multimedia-message.react.js';
import { MessageHeader } from './message-header.react.js';
-import {
- useSendReaction,
- useReactionSelectionPopoverPosition,
-} from './reaction-message-utils.js';
+import { useSendReaction } from './reaction-message-utils.js';
import ReactionSelectionPopover from './reaction-selection-popover.react.js';
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { useAnimatedMessageTooltipButton } from './utils.js';
@@ -45,7 +42,7 @@
setSidebarInputBarHeight(height);
}, []);
- const { item, verticalBounds, initialCoordinates, margin } = route.params;
+ const { item, verticalBounds, initialCoordinates } = route.params;
const { style: messageContainerStyle } = useAnimatedMessageTooltipButton({
sourceMessage: item,
@@ -117,12 +114,6 @@
reactions,
);
- const reactionSelectionPopoverPosition = useReactionSelectionPopoverPosition({
- initialCoordinates,
- verticalBounds,
- margin,
- });
-
const [emojiPickerOpen, setEmojiPickerOpen] = React.useState<boolean>(false);
const openEmojiPicker = React.useCallback(() => {
setEmojiPickerOpen(true);
@@ -138,9 +129,6 @@
navigation={navigation}
route={route}
openEmojiPicker={openEmojiPicker}
- reactionSelectionPopoverContainerStyle={
- reactionSelectionPopoverPosition
- }
sendReaction={sendReaction}
/>
);
@@ -149,7 +137,6 @@
route,
openEmojiPicker,
canCreateReactionFromMessage,
- reactionSelectionPopoverPosition,
sendReaction,
]);
diff --git a/native/chat/reaction-selection-popover.react.js b/native/chat/reaction-selection-popover.react.js
--- a/native/chat/reaction-selection-popover.react.js
+++ b/native/chat/reaction-selection-popover.react.js
@@ -3,32 +3,33 @@
import * as React from 'react';
import { View, TouchableOpacity, Text } from 'react-native';
+import { useReactionSelectionPopoverPosition } from './reaction-message-utils.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
import type { TooltipModalParamList } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
import type { TooltipRoute } from '../tooltip/tooltip.react.js';
-import type { ViewStyle } from '../types/styles.js';
type Props<RouteName: $Keys<TooltipModalParamList>> = {
+navigation: AppNavigationProp<RouteName>,
+route: TooltipRoute<RouteName>,
+openEmojiPicker: () => mixed,
- +reactionSelectionPopoverContainerStyle: ViewStyle,
+sendReaction: (reaction: string) => mixed,
};
function ReactionSelectionPopover<RouteName: $Keys<TooltipModalParamList>>(
props: Props<RouteName>,
): React.Node {
- const {
- navigation,
- route,
- openEmojiPicker,
- reactionSelectionPopoverContainerStyle,
- sendReaction,
- } = props;
+ const { navigation, route, openEmojiPicker, sendReaction } = props;
+
+ const { verticalBounds, initialCoordinates, margin } = route.params;
+ const reactionSelectionPopoverContainerStyle =
+ useReactionSelectionPopoverPosition({
+ initialCoordinates,
+ verticalBounds,
+ margin,
+ });
const styles = useStyles(unboundStyles);
diff --git a/native/chat/robotext-message-tooltip-button.react.js b/native/chat/robotext-message-tooltip-button.react.js
--- a/native/chat/robotext-message-tooltip-button.react.js
+++ b/native/chat/robotext-message-tooltip-button.react.js
@@ -9,10 +9,7 @@
import { TooltipInlineEngagement } from './inline-engagement.react.js';
import { InnerRobotextMessage } from './inner-robotext-message.react.js';
-import {
- useSendReaction,
- useReactionSelectionPopoverPosition,
-} from './reaction-message-utils.js';
+import { useSendReaction } from './reaction-message-utils.js';
import ReactionSelectionPopover from './reaction-selection-popover.react.js';
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { Timestamp } from './timestamp.react.js';
@@ -43,7 +40,7 @@
setSidebarInputBarHeight(height);
}, []);
- const { item, verticalBounds, initialCoordinates, margin } = route.params;
+ const { item, verticalBounds, initialCoordinates } = route.params;
const { style: messageContainerStyle } = useAnimatedMessageTooltipButton({
sourceMessage: item,
@@ -101,12 +98,6 @@
reactions,
);
- const reactionSelectionPopoverPosition = useReactionSelectionPopoverPosition({
- initialCoordinates,
- verticalBounds,
- margin,
- });
-
const [emojiPickerOpen, setEmojiPickerOpen] = React.useState<boolean>(false);
const openEmojiPicker = React.useCallback(() => {
setEmojiPickerOpen(true);
@@ -122,9 +113,6 @@
navigation={navigation}
route={route}
openEmojiPicker={openEmojiPicker}
- reactionSelectionPopoverContainerStyle={
- reactionSelectionPopoverPosition
- }
sendReaction={sendReaction}
/>
);
@@ -133,7 +121,6 @@
route,
openEmojiPicker,
canCreateReactionFromMessage,
- reactionSelectionPopoverPosition,
sendReaction,
]);
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
@@ -12,10 +12,7 @@
import { MessageHeader } from './message-header.react.js';
import { MessageListContextProvider } from './message-list-types.js';
import { MessagePressResponderContext } from './message-press-responder-context.js';
-import {
- useSendReaction,
- useReactionSelectionPopoverPosition,
-} from './reaction-message-utils.js';
+import { useSendReaction } from './reaction-message-utils.js';
import ReactionSelectionPopover from './reaction-selection-popover.react.js';
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { useAnimatedMessageTooltipButton } from './utils.js';
@@ -45,7 +42,7 @@
setSidebarInputBarHeight(height);
}, []);
- const { item, verticalBounds, initialCoordinates, margin } = route.params;
+ const { item, verticalBounds, initialCoordinates } = route.params;
const {
style: messageContainerStyle,
@@ -114,12 +111,6 @@
reactions,
);
- const reactionSelectionPopoverPosition = useReactionSelectionPopoverPosition({
- initialCoordinates,
- verticalBounds,
- margin,
- });
-
const [emojiPickerOpen, setEmojiPickerOpen] = React.useState<boolean>(false);
const openEmojiPicker = React.useCallback(() => {
setEmojiPickerOpen(true);
@@ -135,9 +126,6 @@
navigation={navigation}
route={route}
openEmojiPicker={openEmojiPicker}
- reactionSelectionPopoverContainerStyle={
- reactionSelectionPopoverPosition
- }
sendReaction={sendReaction}
/>
);
@@ -146,7 +134,6 @@
route,
openEmojiPicker,
canCreateReactionFromMessage,
- reactionSelectionPopoverPosition,
sendReaction,
]);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 1:31 PM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2590549
Default Alt Text
D7010.diff (7 KB)

Event Timeline