mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Created and updated dates for waypoints
This commit is contained in:
parent
8970464fec
commit
1cd9c8d350
2 changed files with 5 additions and 0 deletions
|
|
@ -807,6 +807,8 @@ func waypointPacket (packet: MeshPacket, context: NSManagedObjectContext) {
|
|||
if waypointMessage.expire > 0 {
|
||||
waypoint.expire = Date(timeIntervalSince1970: TimeInterval(Int64(waypointMessage.expire)))
|
||||
}
|
||||
waypoint.created = Date()
|
||||
waypoint.lastUpdated = Date()
|
||||
do {
|
||||
try context.save()
|
||||
print("💾 Updated Node Waypoint App Packet For: \(waypoint.id)")
|
||||
|
|
@ -826,6 +828,7 @@ func waypointPacket (packet: MeshPacket, context: NSManagedObjectContext) {
|
|||
if waypointMessage.expire > 0 {
|
||||
fetchedWaypoint[0].expire = Date(timeIntervalSince1970: TimeInterval(Int64(waypointMessage.expire)))
|
||||
}
|
||||
fetchedWaypoint[0].lastUpdated = Date()
|
||||
do {
|
||||
try context.save()
|
||||
print("💾 Updated Node Waypoint App Packet For: \(fetchedWaypoint[0].id)")
|
||||
|
|
|
|||
|
|
@ -282,9 +282,11 @@
|
|||
</fetchedProperty>
|
||||
</entity>
|
||||
<entity name="WaypointEntity" representedClassName="WaypointEntity" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="created" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<attribute name="expire" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<attribute name="icon" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="id" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="lastUpdated" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<attribute name="latitudeI" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="locked" attributeType="Integer 64" defaultValueString="NO" usesScalarValueType="YES"/>
|
||||
<attribute name="longDescription" optional="YES" attributeType="String" maxValueString="100"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue