We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f4574 commit 917f26aCopy full SHA for 917f26a
ios/RNCSafeAreaContext.mm
@@ -78,10 +78,10 @@ - (NSDictionary *)getConstants
78
};
79
80
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
81
- if ([defaults objectForKey:kSafeAreaInitialMetricsKey] == nil) {
+ if (cachedMetrics == nil || ![windowMetrics isEqualToDictionary:cachedMetrics]) {
82
[defaults setObject:windowMetrics forKey:kSafeAreaInitialMetricsKey];
83
[defaults synchronize];
84
- NSLog(@"RNCSafeAreaContext: cached initial window metrics to NSUserDefaults for the first time");
+ NSLog(@"RNCSafeAreaContext: saved initial window metrics");
85
}
86
87
constants = @{@"initialWindowMetrics" : windowMetrics};
0 commit comments