Skip to content

Commit d21e74f

Browse files
authored
Merge pull request #2 from NIKHIL0VERMA/core
Core - orientation and slider
2 parents d5ef175 + 95cdc0e commit d21e74f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hooks/useFullscreenBack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ export function useFullscreenBack(isFullscreen: boolean) {
1919
if (isFullscreen) {
2020
if (ExpoOrientation) {
2121
// Expo projects
22+
ExpoOrientation.lockAsync(
23+
ExpoOrientation.OrientationLock.PORTRAIT_UP
24+
).catch(() => {});
2225
ExpoOrientation.lockAsync(
2326
ExpoOrientation.OrientationLock.DEFAULT
2427
).catch(() => {});
2528
} else if (RNOrientation) {
2629
// Bare RN projects
2730
RNOrientation.lockToPortrait();
31+
RNOrientation.unlockAllOrientations();
2832
}
2933
return true;
3034
}

0 commit comments

Comments
 (0)