Skip to content

Commit

Permalink
Clear bundler banner messages after a certain delay during development.
Browse files Browse the repository at this point in the history
Summary: Changelog: [General] [iOS] Clear bundler banner messages after a certain delay during development.

Differential Revision: D47478373

fbshipit-source-id: 0a1f2750d7fd54a1302cd6b9049b0789e9d3143b
  • Loading branch information
jacdebug authored and facebook-github-bot committed Jul 14, 2023
1 parent 44a507f commit 80f72c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-native/React/CoreModules/RCTDevLoadingView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ - (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(
UIWindowScene *scene = (UIWindowScene *)RCTSharedApplication().connectedScenes.anyObject;
self->_window.windowScene = scene;
});

// Cancel previous hide call after the delay.
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hide) object:nil];
// Set new hide call after a delay.
[self performSelector:@selector(hide) withObject:nil afterDelay:30.0];
}

RCT_EXPORT_METHOD(showMessage
Expand Down

0 comments on commit 80f72c5

Please sign in to comment.