Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 539e665589
commit bf2db32f85

@ -109,9 +109,10 @@ NS_ASSUME_NONNULL_BEGIN
NSString *attachmentID = [userinfo objectForKey:kAttachmentUploadAttachmentIDKey]; NSString *attachmentID = [userinfo objectForKey:kAttachmentUploadAttachmentIDKey];
if ([self.attachment.uniqueId isEqualToString:attachmentID]) { if ([self.attachment.uniqueId isEqualToString:attachmentID]) {
if (!isnan(progress)) { if (!isnan(progress)) {
[_progressView setProgress:(float)progress]; [_progressView setProgress:progress];
self.isAttachmentReady = self.attachment.isUploaded; self.isAttachmentReady = self.attachment.isUploaded;
} else { } else {
OWSAssert(0);
self.isAttachmentReady = YES; self.isAttachmentReady = YES;
} }
} }

@ -2,13 +2,15 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// //
#pragma once
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface OWSProgressView : UIView @interface OWSProgressView : UIView
@property (nonatomic) UIColor *color; @property (nonatomic) UIColor *color;
@property (nonatomic) CGFloat progress; @property (nonatomic) CGFloat progress;
@end @end
NS_ASSUME_NONNULL_END

@ -4,6 +4,8 @@
#import "OWSProgressView.h" #import "OWSProgressView.h"
NS_ASSUME_NONNULL_BEGIN
@interface OWSProgressView () @interface OWSProgressView ()
@property (nonatomic) CAShapeLayer *borderLayer; @property (nonatomic) CAShapeLayer *borderLayer;
@ -118,3 +120,5 @@
} }
@end @end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save