Skip to content

Commit 00995d1

Browse files
author
Vitaliy G
committed
fixed spelling and added method for setting current time with animation
1 parent 99aa6ef commit 00995d1

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

QMChatViewController/Views/Cells/QMChatMediaAttachmentCell/QMBaseChatMediaAttachmentCell/QMBaseMediaCell.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
- (CALayer *)maskLayerFromImage:(UIImage *)image
3333
withFrame:(CGRect)frame;
3434

35+
- (void)setCurrentTime:(NSTimeInterval)currentTime
36+
animated:(BOOL)animated;
3537
@end
3638

3739

QMChatViewController/Views/Cells/QMChatMediaAttachmentCell/QMBaseChatMediaAttachmentCell/QMBaseMediaCell.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ - (void)awakeFromNib {
7777
- (void)prepareForReuse {
7878

7979
[super prepareForReuse];
80+
8081
[self setViewState:QMMediaViewStateNotReady];
82+
8183
self.progress = 0.0;
8284
self.previewImageView.image = nil;
8385

@@ -89,7 +91,8 @@ - (void)prepareForReuse {
8991
}
9092
}
9193

92-
- (void)setCurrentTime:(NSTimeInterval)currentTime {
94+
- (void)setCurrentTime:(NSTimeInterval)currentTime
95+
animated:(BOOL)animated {
9396

9497
if (_currentTime == currentTime) {
9598
return;
@@ -103,6 +106,12 @@ - (void)setCurrentTime:(NSTimeInterval)currentTime {
103106
self.durationLabel.text = [self timestampString:currentTime forDuration:_duration];
104107
}
105108

109+
110+
- (void)setCurrentTime:(NSTimeInterval)currentTime {
111+
[self setCurrentTime:currentTime
112+
animated:NO];
113+
}
114+
106115
- (void)showLoadingError:(NSError *)error {
107116

108117
}

QMChatViewController/Views/Cells/QMChatMediaAttachmentCell/QMMediaViewDelegate/QMMediaViewDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ typedef NS_ENUM(NSInteger, QMMediaViewState) {
7474
@property (nonatomic, assign) CGFloat progress;
7575

7676
/**
77-
Sets the placeholder image.
77+
Sets the thumbnail image.
7878
*/
7979
@property (nonatomic, strong) UIImage *thumbnailImage;
8080

0 commit comments

Comments
 (0)