Skip to content

Commit 6229013

Browse files
committed
fix #319: fix timeout interval description demo project
1 parent b1d4ec9 commit 6229013

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/SwiftLocation/Request/Requests/GPSLocation/GPSLocationOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public class GPSLocationOptions: CustomStringConvertible, Codable {
118118

119119
public var description: String {
120120
switch self {
121-
case .immediate(let t): return "immediate \(t)s"
122-
case .delayed(let t): return "delayed \(t)s"
121+
case .immediate(let t): return "immediate \(abs(t))s"
122+
case .delayed(let t): return "delayed \(abs(t))s"
123123
}
124124
}
125125

SwiftLocationPlayground/SwiftLocationPlayground/View Controllers/Features/Location by GPS/GPSController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class GPSController: UIViewController, UITableViewDelegate, UITableViewDataSourc
9494
case .subscription:
9595
cell.valueLabel.text = serviceOptions.subscription.description
9696
case .timeoutInterval:
97-
cell.valueLabel.text = serviceOptions.minTimeInterval?.format() ?? NOT_SET
97+
cell.valueLabel.text = serviceOptions.timeout?.description ?? NOT_SET
9898
case .precise:
9999
cell.valueLabel.text = serviceOptions.precise?.description ?? USER_SET
100100
}

0 commit comments

Comments
 (0)