diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-03-09 08:50:45 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-03-10 17:08:58 -0800 |
commit | 77d99584cec58ea2c6c8b58257ca5e13d0c02834 (patch) | |
tree | 6cad810ecb78b4074ce2ce643800315f7a111d07 /platform/ios | |
parent | 68ba0712f758d774d544e2bdd05af9ff780583da (diff) | |
download | qtlocation-mapboxgl-77d99584cec58ea2c6c8b58257ca5e13d0c02834.tar.gz |
[ios, osx] Distinguish between unknown and inactive state
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/app/MBXDownloadsTableViewController.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/ios/app/MBXDownloadsTableViewController.m b/platform/ios/app/MBXDownloadsTableViewController.m index e5edc336a4..9ec665a5d8 100644 --- a/platform/ios/app/MBXDownloadsTableViewController.m +++ b/platform/ios/app/MBXDownloadsTableViewController.m @@ -126,6 +126,10 @@ static NSString * const MBXDownloadsTableViewActiveCellReuseIdentifier = @"Activ countStyle:NSByteCountFormatterCountStyleFile]; NSString *statusString; switch (task.state) { + case MGLOfflineTaskStateUnknown: + statusString = @"Calculating progress…"; + break; + case MGLOfflineTaskStateInactive: statusString = [NSString stringWithFormat:@"%@ of %@ resources (%@)", completedString, expectedString, byteCountString]; @@ -176,6 +180,9 @@ static NSString * const MBXDownloadsTableViewActiveCellReuseIdentifier = @"Activ MGLOfflineTask *task = self.offlineTasks[indexPath.row]; switch (task.state) { + case MGLOfflineTaskStateUnknown: + break; + case MGLOfflineTaskStateComplete: if ([task.region respondsToSelector:@selector(applyToMapView:)]) { [task.region performSelector:@selector(applyToMapView:) withObject:self.mapView]; |