Speed up loading banner animations

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
This commit is contained in:
Rick Hanlon 2020-04-28 23:16:58 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 2b771b0129
Коммит 3fb37b4326
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -186,11 +186,11 @@ RCT_EXPORT_METHOD(hide)
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:^{