Skip to content

Commit

Permalink
fix: override default handler with onPressHandler prop for ToggleCame…
Browse files Browse the repository at this point in the history
…raButton (#1053)

To keep the behaviour of onPressHandler consistent with other control
buttons.
  • Loading branch information
vishalnarkhede authored Sep 5, 2023
1 parent be71e47 commit 2eecce6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export const ToggleCameraFaceButton = ({
theme: { colors, toggleCameraFaceButton },
} = useTheme();
const onPress = async () => {
onPressHandler?.();
if (onPressHandler) {
onPressHandler();
return;
}

await call?.camera.flip();
};

Expand Down

0 comments on commit 2eecce6

Please sign in to comment.