Skip to content

Commit

Permalink
when call lockToXXX, not sent deviceOrientationDidChange
Browse files Browse the repository at this point in the history
  • Loading branch information
Wonday committed Feb 15, 2019
1 parent f0327cf commit b984688
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iOS/RCTOrientation/Orientation.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ - (void)deviceOrientationDidChange:(NSNotification *)notification
return;
}

// when call lockToXXX, not sent orientationDidChange
if (!_isLocking && orientation!=UIInterfaceOrientationUnknown && orientation!=_lastOrientation) {
if (orientation!=UIInterfaceOrientationUnknown && orientation!=_lastOrientation) {
[self sendEventWithName:@"orientationDidChange" body:@{@"orientation": [self getOrientationStr:orientation]}];
_lastOrientation = orientation;
}

if (deviceOrientation!=_lastDeviceOrientation) {
// when call lockToXXX, not sent deviceOrientationDidChange
if (!_isLocking && deviceOrientation!=_lastDeviceOrientation) {
[self sendEventWithName:@"deviceOrientationDidChange" body:@{@"deviceOrientation":[self getOrientationStr:deviceOrientation]}];
_lastDeviceOrientation = deviceOrientation;
}
Expand Down

0 comments on commit b984688

Please sign in to comment.