|
@@ -10,7 +10,10 @@ struct Content: View { |
|
|
var ids = ["1", "2", "3", "4"] |
|
|
var ids = ["1", "2", "3", "4"] |
|
|
|
|
|
|
|
|
@StateObject var adates = BusUI.Value(Mic.K.activityDates, [String: Date]()) |
|
|
@StateObject var adates = BusUI.Value(Mic.K.activityDates, [String: Date]()) |
|
|
var keys: [String] { Array(adates.v.keys) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func val(_ k: String) -> Date { |
|
|
|
|
|
adates.v[k] ?? .distantPast |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var body: some View { |
|
|
var body: some View { |
|
|
VStack { |
|
|
VStack { |
|
@@ -29,8 +32,8 @@ struct Content: View { |
|
|
Divider() |
|
|
Divider() |
|
|
.padding() |
|
|
.padding() |
|
|
List { |
|
|
List { |
|
|
ForEach(keys, id: \.self) { |
|
|
|
|
|
Text("\($0): \(String(describing: adates.v[$0]))") |
|
|
|
|
|
|
|
|
ForEach(ids, id: \.self) { |
|
|
|
|
|
Text("\($0): \(val($0).timeIntervalSince1970)") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|