Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Mage/OfflineMapTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ extension OfflineMapTableViewController: NSFetchedResultsControllerDelegate {
} else {
if let fileDictionary = layer.file {
let downloadBytes = layer.downloadedBytes ?? 0
let totalBytes = fileDictionary["size"] as? Int ?? 0
let totalBytesString = fileDictionary["size"] as? String ?? "0"
let totalBytes = (try? Int(totalBytesString, format: .number, lenient: true)) ?? 0
cell?.detailTextLabel?.text = "Downloading, Please wait: \(ByteCountFormatter.string(fromByteCount: Int64(truncating: downloadBytes), countStyle: .file)) of \(ByteCountFormatter.string(fromByteCount: Int64(totalBytes), countStyle: .file))"
} else {
cell?.detailTextLabel?.text = "Loading static feature data, Please wait"
Expand Down Expand Up @@ -589,7 +590,7 @@ extension OfflineMapTableViewController: NSFetchedResultsControllerDelegate {
let cancelAction = UIAlertAction(title: "Cancel Download", style: .cancel) { [weak self] _ in
self?.cancelGeoPackageDownload(layer: layer)
}
let continueAction = UIAlertAction(title: "Continue Download", style: .cancel)
let continueAction = UIAlertAction(title: "Continue Download", style: .default)

alert.addAction(restartAction)
alert.addAction(cancelAction)
Expand Down