Skip to content

Commit b4c4979

Browse files
committed
apply suggestions
1 parent 8307ccb commit b4c4979

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

ios/RNSScreen.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,7 @@ - (void)presentViewController:(UIViewController *)viewControllerToPresent
19951995
}
19961996

19971997
#pragma mark - RNSOrientationProviding
1998+
19981999
- (RNSOrientation)evaluateOrientation
19992000
{
20002001
return rnscreens::conversion::RNSOrientationFromUIInterfaceOrientationMask([self supportedInterfaceOrientations]);

ios/bottom-tabs/RNSTabBarController.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
5959
/**
6060
* Find out which tab bar controller is currently focused & select it.
6161
*
62-
* This method does nothing if the update has not been previoulsy requested.
62+
* This method does nothing if the update has not been previously requested.
6363
* If needed, the requested update is performed immediately. If you do not need this, consider just raising an
6464
* appropriate invalidation signal & let the controller decide when to flush the updates.
6565
*/
@@ -76,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN
7676
/**
7777
* Updates the tab bar appearance basing on configuration sources (host view, tab screens).
7878
*
79-
* This method does nothing if the update has not been previoulsy requested.
79+
* This method does nothing if the update has not been previously requested.
8080
* If needed, the requested update is performed immediately. If you do not need this, consider just raising an
8181
* appropriate invalidation signal & let the controller decide when to flush the updates.
8282
*/
@@ -93,7 +93,7 @@ NS_ASSUME_NONNULL_BEGIN
9393
/**
9494
* Updates the interface orientation based on selected tab screen and its children.
9595
*
96-
* This method does nothing if the update has not been previoulsy requested.
96+
* This method does nothing if the update has not been previously requested.
9797
* If needed, the requested update is performed immediately. If you do not need this, consider just raising an
9898
* appropriate invalidation signal & let the controller decide when to flush the updates.
9999
*/
@@ -119,23 +119,23 @@ NS_ASSUME_NONNULL_BEGIN
119119

120120
/**
121121
* Tell the controller that react provided tabs have changed (count / instances) & the child view controllers need to be
122-
* udpated.
122+
* updated.
123123
*
124124
* This also automatically raises `needsReactChildrenUpdate` flag, no need to call it manually.
125125
*/
126126
- (void)childViewControllersHaveChangedTo:(nonnull NSArray<RNSTabsScreenViewController *> *)childViewControllers;
127127

128128
/**
129129
* Tell the controller that react provided tabs have changed (count / instances) & the child view controllers need to be
130-
* udpated.
130+
* updated.
131131
*
132132
* Do not raise this signal only when focused state of the tab has changed - use `needsSelectedTabUpdate` instead.
133133
*/
134134
@property (nonatomic, readwrite) bool needsUpdateOfReactChildrenControllers;
135135

136136
/**
137137
* Tell the controller that react provided tabs have changed (count / instances) & the child view controllers need to be
138-
* udpated.
138+
* updated.
139139
*/
140140
@property (nonatomic, readwrite) bool needsUpdateOfSelectedTab;
141141

@@ -148,7 +148,7 @@ NS_ASSUME_NONNULL_BEGIN
148148
/**
149149
* Tell the controller that some configuration regarding interface orientation has changed & it requires update.
150150
*/
151-
@property (nonatomic, readwrite) bool needsUpdateOfOrientation;
151+
@property (nonatomic, readwrite) bool needsOrientationUpdate;
152152

153153
@end
154154

ios/bottom-tabs/RNSTabBarController.mm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ - (void)setNeedsUpdateOfTabBarAppearance:(bool)needsUpdateOfTabBarAppearance
7171
#endif // !RCT_NEW_ARCH_ENABLED
7272
}
7373

74-
- (void)setNeedsUpdateOfOrientation:(bool)needsUpdateOfOrientation
74+
- (void)setNeedsOrientationUpdate:(bool)needsOrientationUpdate
7575
{
76-
_needsUpdateOfOrientation = needsUpdateOfOrientation;
76+
_needsOrientationUpdate = needsOrientationUpdate;
7777
}
7878

7979
#pragma mark-- RNSReactTransactionObserving
@@ -213,7 +213,7 @@ - (void)scheduleControllerUpdateIfNeeded
213213

214214
- (void)updateOrientationIfNeeded
215215
{
216-
if (_needsUpdateOfOrientation) {
216+
if (_needsOrientationUpdate) {
217217
[self updateOrientation];
218218
}
219219
}
@@ -224,6 +224,7 @@ - (void)updateOrientation
224224
}
225225

226226
#pragma mark - RNSOrientationProviding
227+
227228
- (RNSOrientation)evaluateOrientation
228229
{
229230
if ([self.selectedViewController respondsToSelector:@selector(evaluateOrientation)]) {

ios/bottom-tabs/RNSTabsScreenViewController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ - (void)tabItemAppearanceHasChanged
3434

3535
- (void)tabScreenOrientationHasChanged
3636
{
37-
[[self findTabBarController] setNeedsUpdateOfOrientation:true];
37+
[[self findTabBarController] setNeedsOrientationUpdate:true];
3838
}
3939

4040
- (void)viewWillAppear:(BOOL)animated

ios/conversion/RNSConversions.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ UIInterfaceOrientationMask UIInterfaceOrientationMaskFromRNSOrientation(RNSOrien
2424
RCTLogError(@"[RNScreens] RNSOrientationInherit does not map directly to any UIInterfaceOrientationMask");
2525
return 0;
2626
default:
27-
RCTLogError(@"[RNScreens] unsupported orientaion");
27+
RCTLogError(@"[RNScreens] Unsupported orientation");
2828
return 0;
2929
}
3030
}
@@ -46,7 +46,7 @@ RNSOrientation RNSOrientationFromUIInterfaceOrientationMask(UIInterfaceOrientati
4646
case UIInterfaceOrientationMaskPortrait:
4747
return RNSOrientationPortrait;
4848
default:
49-
RCTLogError(@"[RNScreens] unsupported orientation mask");
49+
RCTLogError(@"[RNScreens] Unsupported orientation mask");
5050
return RNSOrientationInherit;
5151
}
5252
}

0 commit comments

Comments
 (0)