react-native-screens
react-native-screens copied to clipboard
fix: properly lock orientation
Description
Fixes #2197 When set orientation into landscape while real device orientation is landscape, it is not locked into landscape properly(if I rotate device into portrait, it rotated).
Changes
force to change orientation every time with proper value.
Screenshots / GIFs
Before
https://github.com/software-mansion/react-native-screens/assets/58962402/96a82a9e-9c13-4caf-83d5-a72012fec137
After
https://github.com/software-mansion/react-native-screens/assets/58962402/34425e87-3b5f-4a12-8bbc-3837ea4409fd
Test code and steps to reproduce
Checklist
- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Updated documentation:
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [ ] Ensured that CI passes