Skip to content

Commit

Permalink
change menu items order.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
  • Loading branch information
Krishna2323 committed Feb 21, 2024
1 parent 8144890 commit 2f3df12
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/components/VideoPlayerContexts/VideoPopoverMenuContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,7 @@ function VideoPopoverMenuContextProvider({children}) {
}, [currentVideoPlayerRef]);

const menuItems = useMemo(() => {
const items = [
{
icon: Expensicons.Meter,
text: translate('videoPlayer.playbackSpeed'),
subMenuItems: [
..._.map(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS, (speed) => ({
icon: currentPlaybackSpeed === speed ? Expensicons.Checkmark : null,
text: speed.toString(),
onSelected: () => {
updatePlaybackSpeed(speed);
},
shouldPutLeftPaddingWhenNoIcon: true,
})),
],
},
];
const items = [];

if (!isOffline) {
items.push({
Expand All @@ -60,6 +45,21 @@ function VideoPopoverMenuContextProvider({children}) {
});
}

items.push({
icon: Expensicons.Meter,
text: translate('videoPlayer.playbackSpeed'),
subMenuItems: [
..._.map(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS, (speed) => ({
icon: currentPlaybackSpeed === speed ? Expensicons.Checkmark : null,
text: speed.toString(),
onSelected: () => {
updatePlaybackSpeed(speed);
},
shouldPutLeftPaddingWhenNoIcon: true,
})),
],
});

return items;
}, [currentPlaybackSpeed, downloadAttachment, translate, updatePlaybackSpeed, isOffline]);

Expand Down

0 comments on commit 2f3df12

Please sign in to comment.