25 lines
611 B
Swift
25 lines
611 B
Swift
import Foundation
|
|
|
|
enum DataRefreshMode: String, CaseIterable, Identifiable {
|
|
case standard
|
|
case smart
|
|
|
|
var id: String { rawValue }
|
|
|
|
var displayName: String {
|
|
switch self {
|
|
case .standard: return "Standard"
|
|
case .smart: return "Smart"
|
|
}
|
|
}
|
|
|
|
var summary: String {
|
|
switch self {
|
|
case .standard:
|
|
return "Saves battery. Refreshes price data up to twice daily."
|
|
case .smart:
|
|
return "Checks for newer data more often in the background and refreshes full prices only when an update is available."
|
|
}
|
|
}
|
|
}
|