File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -216,16 +216,9 @@ - (void)pauseTaskWithId: (NSString*)taskId
216216 NSString *taskIdValue = [weakSelf identifierForTask: download];
217217 if ([taskId isEqualToString: taskIdValue] && (state == NSURLSessionTaskStateRunning )) {
218218 NSDictionary *task = [weakSelf loadTaskWithId: taskIdValue];
219-
220- int progress = 0 ;
221- if (download.countOfBytesExpectedToReceive > 0 ) {
222- int64_t bytesReceived = download.countOfBytesReceived ;
223- int64_t bytesExpectedToReceive = download.countOfBytesExpectedToReceive ;
224- progress = round (bytesReceived * 100 / (double )bytesExpectedToReceive);
225- } else {
226- NSNumber *progressNumOfTask = task[@" progress" ];
227- progress = progressNumOfTask.intValue ;
228- }
219+
220+ NSNumber *progressNumOfTask = task[@" progress" ];
221+ int progress = progressNumOfTask.intValue ;
229222
230223 [download cancelByProducingResumeData: ^(NSData * _Nullable resumeData) {
231224 // Save partial downloaded data to a file
You can’t perform that action at this time.
0 commit comments