Skip to content

Commit

Permalink
fix: Properly clean up RCTDevLoadingView on hide (#2201)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Sep 26, 2024
1 parent a87ddb5 commit 704b60c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-native/React/CoreModules/RCTDevLoadingView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ - (void)showMessage:(NSString *)message color:(RCTUIColor *)color backgroundColo
self->_label.font = [UIFont monospacedDigitSystemFontOfSize:12.0 weight:UIFontWeightRegular];
self->_label.textAlignment = NSTextAlignmentCenter;
#else // [macOS
self->_window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 375, 20)
self->_window = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 375, 20)
styleMask:NSWindowStyleMaskBorderless
backing:NSBackingStoreBuffered
defer:YES];
Expand Down Expand Up @@ -214,6 +214,8 @@ - (void)showMessage:(NSString *)message color:(RCTUIColor *)color backgroundColo
}];
#else // [macOS]
[RCTKeyWindow() endSheet:self->_window];
self->_window = nil;
self->_hiding = false;
#endif // macOS]
});
}
Expand Down

0 comments on commit 704b60c

Please sign in to comment.