Skip to content

Commit 411e59c

Browse files
authored
Merge pull request #8866 from Expensify/tgolen-cleanup-videocall
Remove unnecessary _.map in the code for video call menu items
2 parents 429833d + 2180388 commit 411e59c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/VideoChatButtonAndMenu.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ class VideoChatButtonAndMenu extends Component {
3939
this.toggleVideoChatMenu = this.toggleVideoChatMenu.bind(this);
4040
this.measureVideoChatIconPosition = this.measureVideoChatIconPosition.bind(this);
4141
this.videoChatIconWrapper = null;
42-
this.menuItemData = _.map([
42+
this.menuItemData = [
4343
{
4444
icon: ZoomIcon,
4545
text: props.translate('videoChatButtonAndMenu.zoom'),
46-
onPress: () => Linking.openURL(CONST.NEW_ZOOM_MEETING_URL),
46+
onPress: () => {
47+
this.toggleVideoChatMenu();
48+
Linking.openURL(CONST.NEW_ZOOM_MEETING_URL);
49+
},
4750
},
4851
{
4952
icon: GoogleMeetIcon,
5053
text: props.translate('videoChatButtonAndMenu.googleMeet'),
51-
onPress: () => Linking.openURL(CONST.NEW_GOOGLE_MEET_MEETING_URL),
54+
onPress: () => {
55+
this.toggleVideoChatMenu();
56+
Linking.openURL(CONST.NEW_GOOGLE_MEET_MEETING_URL);
57+
},
5258
},
53-
], item => ({
54-
...item,
55-
onPress: () => {
56-
item.onPress();
57-
this.toggleVideoChatMenu();
58-
},
59-
}));
59+
];
6060

6161
this.state = {
6262
isVideoChatMenuActive: false,

0 commit comments

Comments
 (0)