Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3299962
D3310.id10114.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3310.id10114.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 4:39 PM (22 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535085
Default Alt Text
D3310.id10114.diff (1 KB)
Attached To
Mode
D3310: [web] Remove extraneous `sidebarExistsOrCanBeCreated` prop in `MessageActionButtons`
Attached
Detach File
Event Timeline
Log In to Comment