File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ - (void)makeShared:(void*)runtime {
8181 return [self setRootViewBackgroundColor: color alpha: alpha];
8282 });
8383
84+ dispatch_semaphore_t semaphore = dispatch_semaphore_create (0 );
8485 dispatch_async (dispatch_get_main_queue (), ^{
8586 Screen screen = [self getScreenDimensions ];
8687
@@ -92,7 +93,11 @@ - (void)makeShared:(void*)runtime {
9293 unistylesRuntime->pixelRatio = screen.pixelRatio ;
9394 unistylesRuntime->fontScale = screen.fontScale ;
9495 unistylesRuntime->rtl = [self isRtl ];
96+
97+ dispatch_semaphore_signal (semaphore);
9598 });
99+
100+ dispatch_semaphore_wait (semaphore, DISPATCH_TIME_FOREVER);
96101}
97102
98103- (void )onAppearanceChange : (NSNotification *)notification {
@@ -155,7 +160,7 @@ - (bool)isRtl {
155160 BOOL hasForcedRtl = [[NSUserDefaults standardUserDefaults ] boolForKey: @" RCTI18nUtil_forceRTL" ];
156161 // user preferences
157162 BOOL isRtl = [UIApplication sharedApplication ].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft;
158-
163+
159164 return hasForcedRtl || isRtl;
160165}
161166
You can’t perform that action at this time.
0 commit comments