Fix minor issue with notification of finished via KVO and return _fractionCompleted

This commit is contained in:
Gregory John Casamento 2019-09-30 10:48:19 -04:00
parent 11207f91b0
commit 639bb94056

View file

@ -216,7 +216,9 @@ static NSMutableDictionary *__subscribers = nil;
/ (double)internal->_totalUnitCount);
if(internal->_fractionCompleted >= 1)
{
[self willChangeValueForKey: @"finished"];
internal->_finished = YES;
[self didChangeValueForKey: @"finished"];
}
[self didChangeValueForKey: @"fractionCompleted"];
@ -246,8 +248,7 @@ static NSMutableDictionary *__subscribers = nil;
// Observing progress
- (double) fractionCompleted
{
return (double)((double)internal->_completedUnitCount
/ (double)internal->_totalUnitCount);
return internal->_fractionCompleted;
}
// Controlling progress