Use time again on the mesh map. Back to a week

This commit is contained in:
Garth Vander Houwen 2024-01-20 19:49:29 -08:00
parent 3424523d98
commit 7f1f79b837

View file

@ -44,9 +44,8 @@ struct MeshMap: View {
var delay: Double = 0
@State private var scale: CGFloat = 0.5
/// "time >= %@ && nodePosition != nil && latest == true"
@FetchRequest(sortDescriptors: [NSSortDescriptor(key: "time", ascending: true)],
predicate: NSPredicate(format: "nodePosition != nil && latest == true", Calendar.current.date(byAdding: .day, value: -30, to: Date())! as NSDate), animation: .none)
predicate: NSPredicate(format: "nodePosition != nil && latest == true && time >= %@", Calendar.current.date(byAdding: .day, value: -7, to: Date())! as NSDate), animation: .none)
private var positions: FetchedResults<PositionEntity>
@FetchRequest(sortDescriptors: [NSSortDescriptor(key: "name", ascending: false)],