Browse Source

Make iVars public in prep for ModelKit(?).

pull/92/head
Abhishek 4 years ago
parent
commit
8a51103232
  1. 30
      Clocker/Panel/Data Layer/TimezoneData.swift
  2. 38
      Clocker/Preferences/General/Models/SearchResults.swift

30
Clocker/Panel/Data Layer/TimezoneData.swift

@ -55,21 +55,21 @@ class TimezoneData: NSObject, NSCoding {
NSNumber(integerLiteral: 9): DateFormat.twelveHourWithoutSuffixAndSeconds,
]
var customLabel: String?
var formattedAddress: String?
var placeID: String?
var timezoneID: String? = CLEmptyString
var latitude: Double?
var longitude: Double?
var note: String? = CLEmptyString
var nextUpdate: Date? = Date()
var sunriseTime: Date?
var sunsetTime: Date?
var isFavourite: Int = 0
var isSunriseOrSunset = false
var selectionType: SelectionType = .city
var isSystemTimezone = false
var overrideFormat: TimezoneOverride = .globalFormat
public var customLabel: String?
public var formattedAddress: String?
public var placeID: String?
public var timezoneID: String? = CLEmptyString
public var latitude: Double?
public var longitude: Double?
public var note: String? = CLEmptyString
public var nextUpdate: Date? = Date()
public var sunriseTime: Date?
public var sunsetTime: Date?
public var isFavourite: Int = 0
public var isSunriseOrSunset = false
public var selectionType: SelectionType = .city
public var isSystemTimezone = false
public var overrideFormat: TimezoneOverride = .globalFormat
override init() {
selectionType = .timezone

38
Clocker/Preferences/General/Models/SearchResults.swift

@ -3,15 +3,15 @@
import Cocoa
public struct SearchResult: Codable {
let results: [Result]
let status: String
public let results: [Result]
public let status: String
public struct Result: Codable {
let addressComponents: [AddressComponent]
let formattedAddress: String
let geometry: Geometry
let placeId: String
let types: [String]
public let addressComponents: [AddressComponent]
public let formattedAddress: String
public let geometry: Geometry
public let placeId: String
public let types: [String]
private enum CodingKeys: String, CodingKey {
case addressComponents = "address_components"
@ -23,12 +23,12 @@ public struct SearchResult: Codable {
}
public struct Geometry: Codable {
let location: Location
let locationType: String
public let location: Location
public let locationType: String
public struct Location: Codable {
let lat: Double
let lng: Double
public let lat: Double
public let lng: Double
}
private enum CodingKeys: String, CodingKey {
@ -38,9 +38,9 @@ public struct SearchResult: Codable {
}
public struct AddressComponent: Codable {
let longName: String
let shortName: String
let types: [String]
public let longName: String
public let shortName: String
public let types: [String]
private enum CodingKeys: String, CodingKey {
case longName = "long_name"
@ -51,9 +51,9 @@ public struct SearchResult: Codable {
}
public struct Timezone: Codable {
let dstOffset: Int
let rawOffset: Int
let status: String
let timeZoneId: String
let timeZoneName: String
public let dstOffset: Int
public let rawOffset: Int
public let status: String
public let timeZoneId: String
public let timeZoneName: String
}

Loading…
Cancel
Save