Skip to content

Commit e790ced

Browse files
committed
chore: rm pointless comments
1 parent 63897bb commit e790ced

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ios/RNCSafeAreaContext.mm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ - (NSDictionary *)getConstants
4343
NSWindow *window = RCTKeyWindow();
4444
#endif
4545
if (window == nil) {
46-
// Try to retrieve cached metrics from NSUserDefaults
4746
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
4847
NSDictionary *cachedMetrics = [defaults objectForKey:kSafeAreaInitialMetricsKey];
4948

@@ -78,11 +77,10 @@ - (NSDictionary *)getConstants
7877
},
7978
};
8079

81-
// Only cache the metrics if they haven't been cached before
8280
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
8381
if ([defaults objectForKey:kSafeAreaInitialMetricsKey] == nil) {
8482
[defaults setObject:windowMetrics forKey:kSafeAreaInitialMetricsKey];
85-
[defaults synchronize]; // Ensure it's persisted immediately
83+
[defaults synchronize];
8684
NSLog(@"RNCSafeAreaContext: cached initial window metrics to NSUserDefaults for the first time");
8785
}
8886

0 commit comments

Comments
 (0)