summaryrefslogtreecommitdiff
path: root/platform/default/mbgl
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-03-09 10:44:30 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-03-09 13:40:00 -0800
commit7cceca4b4576c21c315b445889bad770e7dc4e53 (patch)
treeb0e749be86ed3e56081d44e05f0516574bb0ebdd /platform/default/mbgl
parentbe00dfd3679902870ada89d606e2eed88ce586b1 (diff)
downloadqtlocation-mapboxgl-7cceca4b4576c21c315b445889bad770e7dc4e53.tar.gz
[core] Deactivate OfflineDownload when the tile count limit is hit
This is a better behavior than sending hundreds or thousands of tileCountLimitExceeded notifications.
Diffstat (limited to 'platform/default/mbgl')
-rw-r--r--platform/default/mbgl/storage/offline_download.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/default/mbgl/storage/offline_download.cpp b/platform/default/mbgl/storage/offline_download.cpp
index 8aacc29c56..dc16ab10fd 100644
--- a/platform/default/mbgl/storage/offline_download.cpp
+++ b/platform/default/mbgl/storage/offline_download.cpp
@@ -230,6 +230,7 @@ void OfflineDownload::ensureResource(const Resource& resource, std::function<voi
&& util::mapbox::isMapboxURL(resource.url)
&& offlineDatabase.offlineMapboxTileCountLimitExceeded()) {
observer->mapboxTileCountLimitExceeded(offlineDatabase.getOfflineMapboxTileCountLimit());
+ setState(OfflineRegionDownloadState::Inactive);
return;
}