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/MGLOfflineStorage.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/MGLOfflineStorage.mm')
-rw-r--r-- | platform/darwin/src/MGLOfflineStorage.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm index 3d171ca203..89bf050249 100644 --- a/platform/darwin/src/MGLOfflineStorage.mm +++ b/platform/darwin/src/MGLOfflineStorage.mm @@ -130,10 +130,10 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = @"MaximumCount"; - (void)addPackForRegion:(id <MGLOfflineRegion>)region withContext:(NSData *)context completionHandler:(MGLOfflinePackAdditionCompletionHandler)completion { __weak MGLOfflineStorage *weakSelf = self; [self _addPackForRegion:region withContext:context completionHandler:^(MGLOfflinePack * _Nullable pack, NSError * _Nullable error) { + pack.state = MGLOfflinePackStateInactive; MGLOfflineStorage *strongSelf = weakSelf; [[strongSelf mutableArrayValueForKey:@"packs"] addObject:pack]; pack.delegate = strongSelf; - [pack requestProgress]; if (completion) { completion(pack, error); } @@ -208,7 +208,6 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = @"MaximumCount"; for (MGLOfflinePack *pack in packs) { pack.delegate = self; - [pack requestProgress]; } }]; } |