From 2180388ad1cfaa44a519bb4be6df308745608182 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Tue, 3 May 2022 14:20:38 -0600 Subject: [PATCH] Remove unnecessary _.map in the code for video call menu items --- src/components/VideoChatButtonAndMenu.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/VideoChatButtonAndMenu.js b/src/components/VideoChatButtonAndMenu.js index 73704b3e0c61..02366f9dbe21 100755 --- a/src/components/VideoChatButtonAndMenu.js +++ b/src/components/VideoChatButtonAndMenu.js @@ -39,24 +39,24 @@ class VideoChatButtonAndMenu extends Component { this.toggleVideoChatMenu = this.toggleVideoChatMenu.bind(this); this.measureVideoChatIconPosition = this.measureVideoChatIconPosition.bind(this); this.videoChatIconWrapper = null; - this.menuItemData = _.map([ + this.menuItemData = [ { icon: ZoomIcon, text: props.translate('videoChatButtonAndMenu.zoom'), - onPress: () => Linking.openURL(CONST.NEW_ZOOM_MEETING_URL), + onPress: () => { + this.toggleVideoChatMenu(); + Linking.openURL(CONST.NEW_ZOOM_MEETING_URL); + }, }, { icon: GoogleMeetIcon, text: props.translate('videoChatButtonAndMenu.googleMeet'), - onPress: () => Linking.openURL(CONST.NEW_GOOGLE_MEET_MEETING_URL), + onPress: () => { + this.toggleVideoChatMenu(); + Linking.openURL(CONST.NEW_GOOGLE_MEET_MEETING_URL); + }, }, - ], item => ({ - ...item, - onPress: () => { - item.onPress(); - this.toggleVideoChatMenu(); - }, - })); + ]; this.state = { isVideoChatMenuActive: false,