11import { Platform } from 'react-native' ;
2- import Module from './module ' ;
2+ import NativeOrientationDirector from './NativeOrientationDirector ' ;
33import type { HumanReadableOrientationsResource } from './types/HumanReadableOrientationsResource.type' ;
44import { Orientation } from './types/Orientation.enum' ;
55import { AutoRotation } from './types/AutoRotation.enum' ;
@@ -39,11 +39,11 @@ class RNOrientationDirector {
3939 }
4040
4141 static getInterfaceOrientation ( ) : Promise < Orientation > {
42- return Module . getInterfaceOrientation ( ) ;
42+ return NativeOrientationDirector . getInterfaceOrientation ( ) ;
4343 }
4444
4545 static getDeviceOrientation ( ) : Promise < Orientation > {
46- return Module . getDeviceOrientation ( ) ;
46+ return NativeOrientationDirector . getDeviceOrientation ( ) ;
4747 }
4848
4949 /**
@@ -69,42 +69,42 @@ class RNOrientationDirector {
6969 orientationType : OrientationType = OrientationType . interface
7070 ) {
7171 if ( orientationType === OrientationType . interface ) {
72- Module . lockTo ( orientation ) ;
72+ NativeOrientationDirector . lockTo ( orientation ) ;
7373 return ;
7474 }
7575
7676 if ( orientation === Orientation . landscapeLeft ) {
77- Module . lockTo ( Orientation . landscapeRight ) ;
77+ NativeOrientationDirector . lockTo ( Orientation . landscapeRight ) ;
7878 return ;
7979 }
8080
8181 if ( orientation === Orientation . landscapeRight ) {
82- Module . lockTo ( Orientation . landscapeLeft ) ;
82+ NativeOrientationDirector . lockTo ( Orientation . landscapeLeft ) ;
8383 return ;
8484 }
8585
86- Module . lockTo ( orientation ) ;
86+ NativeOrientationDirector . lockTo ( orientation ) ;
8787 }
8888
8989 static unlock ( ) {
90- Module . unlock ( ) ;
90+ NativeOrientationDirector . unlock ( ) ;
9191 }
9292
9393 static isLocked ( ) {
94- return Module . isLocked ( ) ;
94+ return NativeOrientationDirector . isLocked ( ) ;
9595 }
9696
9797 static isAutoRotationEnabled ( ) {
9898 if ( Platform . OS !== 'android' ) {
9999 return AutoRotation . unknown ;
100100 }
101- return Module . isAutoRotationEnabled ( )
101+ return NativeOrientationDirector . isAutoRotationEnabled ( )
102102 ? AutoRotation . enabled
103103 : AutoRotation . disabled ;
104104 }
105105
106106 static resetSupportedInterfaceOrientations ( ) {
107- Module . resetSupportedInterfaceOrientations ( ) ;
107+ NativeOrientationDirector . resetSupportedInterfaceOrientations ( ) ;
108108 }
109109
110110 static listenForDeviceOrientationChanges (
0 commit comments