Skip to content

Commit 61c8a8b

Browse files
committed
Update version to 1.3.2 in Info.plist; add support for hourly history range in SpeedLocalization and HistoryTimeRange; enhance HistorySectionView with new measurement display and selection overlay.
1 parent 34c2f53 commit 61c8a8b

File tree

4 files changed

+313
-24
lines changed

4 files changed

+313
-24
lines changed

App/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
<key>CFBundlePackageType</key>
2323
<string>APPL</string>
2424
<key>CFBundleShortVersionString</key>
25-
<string>1.3.1</string>
25+
<string>1.3.2</string>
2626
<key>CFBundleVersion</key>
27-
<string>1.3.1</string>
27+
<string>1.3.2</string>
2828
<key>LSMinimumSystemVersion</key>
2929
<string>14.0</string>
3030
<key>LSUIElement</key>

Sources/SpeedCore/Localization/SpeedLocalization.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,8 @@ private struct GermanSpeedStrings: SpeedStringCatalog {
590590

591591
func historyTimeRangeTitle(_ range: HistoryTimeRange) -> String {
592592
switch range {
593+
case .hour:
594+
"1 Std."
593595
case .day:
594596
"24 Std."
595597
case .week:
@@ -920,6 +922,8 @@ private struct EnglishSpeedStrings: SpeedStringCatalog {
920922

921923
func historyTimeRangeTitle(_ range: HistoryTimeRange) -> String {
922924
switch range {
925+
case .hour:
926+
"1h"
923927
case .day:
924928
"24h"
925929
case .week:

Sources/SpeedCore/Models/HistoryTimeRange.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22

33
public enum HistoryTimeRange: String, CaseIterable, Identifiable, Sendable {
4+
case hour
45
case day
56
case week
67
case month
@@ -11,6 +12,8 @@ public enum HistoryTimeRange: String, CaseIterable, Identifiable, Sendable {
1112

1213
public var duration: TimeInterval {
1314
switch self {
15+
case .hour:
16+
3_600
1417
case .day:
1518
86_400
1619
case .week:
@@ -30,6 +33,8 @@ public enum HistoryTimeRange: String, CaseIterable, Identifiable, Sendable {
3033

3134
public func axisFormatStyle(locale: Locale) -> Date.FormatStyle {
3235
switch self {
36+
case .hour:
37+
return Date.FormatStyle(date: .omitted, time: .shortened).locale(locale)
3338
case .day:
3439
return Date.FormatStyle(date: .omitted, time: .shortened).locale(locale)
3540
case .week:

0 commit comments

Comments
 (0)