Video Messages Improvements

This commit is contained in:
Ilya Laktyushin
2021-07-31 00:27:42 +03:00
parent cf4f852043
commit e614343888
6 changed files with 193 additions and 12 deletions

View File

@@ -96,6 +96,7 @@ typedef enum
UIView *_separatorView;
UIImageView *_placeholderView;
TGVideoMessageShimmerView *_shimmerView;
bool _automaticDismiss;
NSTimeInterval _startTimestamp;
@@ -329,6 +330,10 @@ typedef enum
_placeholderView.image = [TGVideoMessageCaptureController startImage];
[_circleView addSubview:_placeholderView];
_shimmerView = [[TGVideoMessageShimmerView alloc] initWithFrame:_circleView.bounds];
[_shimmerView updateAbsoluteRect:_circleView.bounds containerSize:_circleView.bounds.size];
[_circleView addSubview:_shimmerView];
if (iosMajorVersion() >= 11)
{
_shadowView.accessibilityIgnoresInvertColors = true;
@@ -1182,9 +1187,11 @@ typedef enum
[UIView animateWithDuration:0.3 delay:delay options:kNilOptions animations:^
{
_placeholderView.alpha = 0.0f;
_shimmerView.alpha = 0.0f;
_switchButton.alpha = 1.0f;
} completion:^(__unused BOOL finished)
{
_shimmerView.hidden = true;
_placeholderView.hidden = true;
_placeholderView.alpha = 1.0f;
}];