Skip to content

Commit

Permalink
rename to openContextMenu and shouldKeepOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Mar 7, 2023
1 parent 6520062 commit d63a77b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class BaseReportActionContextMenu extends React.Component {
this.wrapperStyle = getReportActionContextMenuStyles(this.props.isMini);

this.state = {
keepOpen: false,
shouldKeepOpen: false,
};
}

Expand All @@ -62,7 +62,7 @@ class BaseReportActionContextMenu extends React.Component {
this.props.isChronosReport,
);

return (this.props.isVisible || this.state.keepOpen) && (
return (this.props.isVisible || this.state.shouldKeepOpen) && (
<View
ref={this.props.contentRef}
style={this.wrapperStyle}
Expand All @@ -74,8 +74,8 @@ class BaseReportActionContextMenu extends React.Component {
reportID: this.props.reportID,
draftMessage: this.props.draftMessage,
selection: this.props.selection,
close: () => this.setState({keepOpen: false}),
keepOpen: () => this.setState({keepOpen: true}),
close: () => this.setState({shouldKeepOpen: false}),
openContextMenu: () => this.setState({shouldKeepOpen: true}),
};

if (contextAction.renderContent) {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/home/report/ContextMenu/ContextMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const CONTEXT_MENU_TYPES = {
// A list of all the context actions in this menu.
export default [
{
keepOpen: true,
shouldKeepOpen: true,
shouldShow: () => true,
renderContent: (closePopover, {
reportID, reportAction, close: closeManually, keepOpen,
reportID, reportAction, close: closeManually, openContextMenu,
}) => {
const isMini = !closePopover;

Expand All @@ -67,7 +67,7 @@ export default [
<MiniQuickEmojiReactions
key="MiniQuickEmojiReactions"
onEmojiSelected={onEmojiSelected}
onPressOpenPicker={keepOpen}
onPressOpenPicker={openContextMenu}
onEmojiPickerClosed={closeContextMenu}
/>
);
Expand Down

0 comments on commit d63a77b

Please sign in to comment.