Skip to content

Commit

Permalink
Speed up loading banner animations
Browse files Browse the repository at this point in the history
Summary:
This diff reduces the minimum loading banner time and animation time to make the locating banner faster.

Changelog: [General] [iOS] Speed up loading banner animations

Reviewed By: PeteTheHeat

Differential Revision: D21290517

fbshipit-source-id: 111dff41df53b0246548e1da1db80c2188498a9c
  • Loading branch information
rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
1 parent 2b771b0 commit 3fb37b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions React/CoreModules/RCTDevLoadingView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ - (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(

dispatch_async(dispatch_get_main_queue(), ^{
self->_hiding = true;
const NSTimeInterval MIN_PRESENTED_TIME = 0.6;
const NSTimeInterval MIN_PRESENTED_TIME = 0.5;
NSTimeInterval presentedTime = [[NSDate date] timeIntervalSinceDate:self->_showDate];
NSTimeInterval delay = MAX(0, MIN_PRESENTED_TIME - presentedTime);
CGRect windowFrame = self->_window.frame;
[UIView animateWithDuration:0.25
[UIView animateWithDuration:0.1
delay:delay
options:0
animations:^{
Expand Down

0 comments on commit 3fb37b4

Please sign in to comment.