Skip to content

Commit 0143064

Browse files
committed
fix: review
1 parent c1a4ad3 commit 0143064

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

ios/RNCChangeEvent.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,5 @@ - (NSArray *)arguments
7575
{
7676
return @[ self.viewTag, RCTNormalizeInputEventName(self.eventName), [self body] ];
7777
}
78-
79-
/*
80-
Not sure if this is needed as eventName is passed in arguments
81-
- (NSString *)eventName
82-
{
83-
return _eventName;
84-
}
85-
*/
8678

8779
@end

ios/RNCSafeAreaProvider.m

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ @implementation RNCSafeAreaProvider {
1616
UIEdgeInsets _currentSafeAreaInsets;
1717
CGRect _currentFrame;
1818
BOOL _initialInsetsSent;
19-
uint16_t _coalescingKey;
2019
}
2120

2221
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher
@@ -89,14 +88,12 @@ - (void)invalidateSafeAreaInsets
8988
_currentFrame = frame;
9089

9190
[NSNotificationCenter.defaultCenter postNotificationName:RNCSafeAreaDidChange object:self userInfo:nil];
92-
93-
// There's currently only 1 event name "onInsetsChange", so the _coalescingKey doesn't needs to be incremented
94-
// Increment _coalescingKey if safeAreaInsets and frame are sent as separate events
95-
RNCChangeEvent *changeEvent = [[RNCChangeEvent alloc] initWithEventName:@"onInsetsChange"
96-
reactTag:self.reactTag
97-
insets:safeAreaInsets
98-
frame:frame
99-
coalescingKey:_coalescingKey];
91+
92+
RNCChangeEvent *changeEvent = [[RNCChangeEvent alloc] initWithEventName:@"onInsetsChange"
93+
reactTag:self.reactTag
94+
insets:safeAreaInsets
95+
frame:frame
96+
coalescingKey:0];
10097

10198

10299
[_eventDispatcher sendEvent:changeEvent];
@@ -109,13 +106,12 @@ - (void)layoutSubviews
109106
[self invalidateSafeAreaInsets];
110107
}
111108

109+
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
110+
RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
111+
112112
- (void)dealloc
113113
{
114114
[_eventDispatcher.bridge.uiManager.observerCoordinator removeObserver:self];
115115
}
116116

117-
118-
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
119-
RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
120-
121117
@end

0 commit comments

Comments
 (0)