mirror of
https://github.com/tonytins/amtkstat.git
synced 2026-10-24 05:32:54 -04:00
Bumped to 0.2.104
- Client now checks for any stale trains that are 48 hours old. - Finally gave Amtraker credit.
This commit is contained in:
parent
ef98531ca2
commit
63b90c0fb1
3 changed files with 15 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ format_version = 2
|
||||||
[apps.AmtrakStatus]
|
[apps.AmtrakStatus]
|
||||||
identifier = 'com.tonybark.AmtrakStatus'
|
identifier = 'com.tonybark.AmtrakStatus'
|
||||||
product = 'AmtrakStatus'
|
product = 'AmtrakStatus'
|
||||||
version = '0.2.103'
|
version = '0.2.104'
|
||||||
icon = "./assets/icon.png"
|
icon = "./assets/icon.png"
|
||||||
category = "public.app-category.travel"
|
category = "public.app-category.travel"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ struct ContentView: View {
|
||||||
|
|
||||||
let amtrakDate = AmtrakDateFormatting()
|
let amtrakDate = AmtrakDateFormatting()
|
||||||
let unknown = "Unknown"
|
let unknown = "Unknown"
|
||||||
let staleDataThreshold: TimeInterval = 60 * 60 * 24 // 24 hours
|
let staleDataThreshold: TimeInterval = 60 * 60 * 48 // 48 hours
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
|
|
@ -94,6 +94,9 @@ struct ContentView: View {
|
||||||
Task {
|
Task {
|
||||||
await loadTrainStatus(forStationCode: normalizedStationCode)
|
await loadTrainStatus(forStationCode: normalizedStationCode)
|
||||||
}
|
}
|
||||||
|
}.overlay(alignment: .topTrailing) {
|
||||||
|
Text("Information by Amtraker")
|
||||||
|
.padding(10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,8 +185,7 @@ struct ContentView: View {
|
||||||
let leg = train.stations?.first { $0.code == stationCode }
|
let leg = train.stations?.first { $0.code == stationCode }
|
||||||
|
|
||||||
guard
|
guard
|
||||||
!isStale(leg, timeZone: timeZone) &&
|
!isStale(leg, timeZone: timeZone), !isDataStale(train.trainID, staleness: staleness)
|
||||||
!isDataStale(train.trainID, staleness: staleness)
|
|
||||||
else {
|
else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -209,8 +211,10 @@ struct ContentView: View {
|
||||||
comparedTo: originZone
|
comparedTo: originZone
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if stationName != unknown {
|
||||||
currentStation = stationName
|
currentStation = stationName
|
||||||
localTimeZone = timeZone
|
localTimeZone = timeZone
|
||||||
|
}
|
||||||
|
|
||||||
return TrainStatusRow(
|
return TrainStatusRow(
|
||||||
trainID: train.trainID,
|
trainID: train.trainID,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 0.2.104
|
||||||
|
|
||||||
|
- Client now checks for any stale trains that are 48 hours old.
|
||||||
|
- Finally gave Amtraker credit.
|
||||||
|
|
||||||
## 0.2.103
|
## 0.2.103
|
||||||
|
|
||||||
- A new column after number has "Enroute," "Station," and "Departed" status. It's left blank since status is already taken.
|
- A new column after number has "Enroute," "Station," and "Departed" status. It's left blank since status is already taken.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue