From 3b546b964609d0f596dac32e155b1489bb85645e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sat, 27 Aug 2016 15:56:19 -0700 Subject: [ios, macos] Ignore progress updates after suspending -suspend and -resume are now presumed to be synchronous, even if technically they remain asynchronous under the hood. --- platform/darwin/src/MGLOfflinePack.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'platform/darwin/src/MGLOfflinePack.h') diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h index 3d4422da33..a14d001d0f 100644 --- a/platform/darwin/src/MGLOfflinePack.h +++ b/platform/darwin/src/MGLOfflinePack.h @@ -144,11 +144,6 @@ typedef struct MGLOfflinePackProgress { /** Resumes downloading if the pack is inactive. - A pack resumes asynchronously. To get notified when this pack resumes, observe - KVO change notifications on this pack’s `state` key path. Alternatively, you - can add an observer for `MGLOfflinePackProgressChangedNotification`s about this - pack that come from the default notification center. - When a pack resumes after being suspended, it may begin by iterating over the already downloaded resources. As a result, the `progress` structure’s `countOfResourcesCompleted` field may revert to 0 before rapidly returning to @@ -161,10 +156,9 @@ typedef struct MGLOfflinePackProgress { /** Temporarily stops downloading if the pack is active. - A pack suspends asynchronously. To get notified when this pack resumes, observe - KVO change notifications on this pack’s `state` key path. Alternatively, you - can add an observer for `MGLOfflinePackProgressChangedNotification` about this - pack that come from the default notification center. + A pack suspends asynchronously, so some network requests may be sent after this + method is called. Regardless, the `progress` property will not be updated until + `-resume` is called. If the pack previously reached a higher level of progress before being suspended, it may wait to suspend until it returns to that level. -- cgit v1.2.1