Page MenuHomePhabricator

D3310.diff
No OneTemporary

D3310.diff

diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js
--- a/web/chat/composed-message.react.js
+++ b/web/chat/composed-message.react.js
@@ -140,7 +140,6 @@
mouseOverMessagePosition={this.props.mouseOverMessagePosition}
canReply={this.props.canReply}
inputState={this.props.inputState}
- sidebarExistsOrCanBeCreated={this.props.sidebarExistsOrCanBeCreated}
/>
);
}
diff --git a/web/chat/message-action-buttons.js b/web/chat/message-action-buttons.js
--- a/web/chat/message-action-buttons.js
+++ b/web/chat/message-action-buttons.js
@@ -5,6 +5,7 @@
import * as React from 'react';
import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';
+import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';
import type { ThreadInfo } from 'lib/types/thread-types';
import type { InputState } from '../input/input-state.js';
@@ -44,7 +45,6 @@
+mouseOverMessagePosition?: OnMessagePositionWithContainerInfo,
+canReply?: boolean,
+inputState?: ?InputState,
- +sidebarExistsOrCanBeCreated?: boolean,
};
function MessageActionButtons(props: MessageActionButtonsProps): React.Node {
const {
@@ -56,7 +56,6 @@
mouseOverMessagePosition,
canReply,
inputState,
- sidebarExistsOrCanBeCreated,
} = props;
const [tooltipVisible, setTooltipVisible] = React.useState(false);
@@ -157,6 +156,11 @@
);
}
+ const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(
+ threadInfo,
+ item,
+ );
+
let sidebarButton;
if (sidebarExistsOrCanBeCreated) {
sidebarButton = (

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 2:42 PM (22 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535085
Default Alt Text
D3310.diff (1 KB)

Event Timeline