summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOfflinePack_Private.h
Commit message (Collapse)AuthorAgeFilesLines
* Make `MGLOfflinePack` instances post notificationsEimantas Vaiciunas2017-02-061-54/+0
| | | | | | | This commit also gets rid of private `MGLOfflinePackDelegate` protocol. `userInfo` dictionary in notification objects retain the `state` and `progress` values for backwards compatibility. They can be removed in later major release.
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-5/+5
|
* [ios, osx] Require progress to be requested manuallyMinh Nguyễn2016-03-291-10/+2
| | | | 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.
* [ios, osx] Invalidate packs upon reloadMinh Nguyễn2016-03-291-1/+1
|
* [ios, osx] More accurate KVO, private delegate, descriptive fallback name, ↵Minh Nguyễn2016-03-291-0/+54
| | | | | | | | | | | | fewer reloads Made MGLOfflineStorage.packs strong rather than copy so that KVO notifications on that key path include index paths. Replaced custom KVO mutable collection methods with calls to -mutableArrayValueForKey:, avoiding redundant casts. Privatized MGLOfflinePackDelegate and made its methods required, since MGLOfflineStorage is the only conforming implementation. Require a pack to be explicitly invalidated before deallocation by its owner (MGLOfflineStorage). Added a method to reload the canonical collection of packs. Previously, if the user adds an offline pack without specifying a name in the alert, the pack would be named “Untitled n” for the nth pack created since the application was launched. This logic could result in identically named packs (for example, if the user relaunches and creates another unnamed pack). Instead, use the visible coordinate bounds as a placeholder and fallback name. Resume a pack upon successful addition. Removed an extraneous weakSelf/strongSelf dance. When possible, update individual labels in a cell instead of reloading the entire cell. That way, if the user swipes to the left to reveal the Delete accessory button while the pack is actively downloading, the accessory button remains on screen as progress updates come in.
* [ios, osx] Centralized offline pack managementMinh Nguyễn2016-03-291-0/+10
| | | | | | MGLOfflineStorage now maintains a centralized, strongly held, KVO-compliant collection of all extant offline packs. MGLOfflineStorage issues notifications for progress updates. Client code can now react to the successful addition of an offline pack either via the completion block or via a KVO insertion. Fixes #4287.
* [ios, osx] Renamed MGLOfflineTask to MGLOfflinePackMinh Nguyễn2016-03-101-0/+21
“Offline pack” more effectively communicates the persistent nature of the downloaded content.