diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-03-28 18:06:52 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-03-29 11:46:27 -0700 |
commit | 38116e39c5832851a585798ab32de3daa03c20e3 (patch) | |
tree | 65479b7e5e29dacedb2d0ed27b519e0890f4bd92 /platform/darwin/src/MGLOfflinePack.mm | |
parent | 78f93708d66d99da71e3292c32f34cc4e46ecc69 (diff) | |
download | qtlocation-mapboxgl-38116e39c5832851a585798ab32de3daa03c20e3.tar.gz |
[ios, osx] Require progress to be requested manually
Requesting progress is expensive, so it is once again computed only on demand, rather than automatically at launch. Moved progress requesting back to iosapp and osxapp.
Diffstat (limited to 'platform/darwin/src/MGLOfflinePack.mm')
-rw-r--r-- | platform/darwin/src/MGLOfflinePack.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLOfflinePack.mm b/platform/darwin/src/MGLOfflinePack.mm index 05ff35ec7f..9775f1cfca 100644 --- a/platform/darwin/src/MGLOfflinePack.mm +++ b/platform/darwin/src/MGLOfflinePack.mm @@ -40,7 +40,6 @@ private: @property (nonatomic, weak, nullable) id <MGLOfflinePackDelegate> delegate; @property (nonatomic, nullable, readwrite) mbgl::OfflineRegion *mbglOfflineRegion; -@property (nonatomic, readwrite) MGLOfflinePackState state; @property (nonatomic, readwrite) MGLOfflinePackProgress progress; @end @@ -123,7 +122,7 @@ private: } - (void)requestProgress { - NSAssert(_state != MGLOfflinePackStateInvalid, @"Cannot request progress from an invalid offline pack."); + MGLAssertOfflinePackIsValid(); mbgl::DefaultFileSource *mbglFileSource = [[MGLOfflineStorage sharedOfflineStorage] mbglFileSource]; |