summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOfflinePack.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-08-27 15:56:19 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-09-20 22:34:54 -0700
commit3b546b964609d0f596dac32e155b1489bb85645e (patch)
tree194683f1e98d191f973384bb48967a6e5e86d31e /platform/darwin/src/MGLOfflinePack.h
parent7df9a21f415aa269e7ae435d1500f4a3c7d607e1 (diff)
downloadqtlocation-mapboxgl-3b546b964609d0f596dac32e155b1489bb85645e.tar.gz
[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.
Diffstat (limited to 'platform/darwin/src/MGLOfflinePack.h')
-rw-r--r--platform/darwin/src/MGLOfflinePack.h12
1 files changed, 3 insertions, 9 deletions
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.