diff --git a/damus/Nostr/CoreData/Damus.xcdatamodeld/Damus.xcdatamodel/contents b/damus/Nostr/CoreData/Damus.xcdatamodeld/Damus.xcdatamodel/contents index 57a6fe21..0f985f18 100644 --- a/damus/Nostr/CoreData/Damus.xcdatamodeld/Damus.xcdatamodel/contents +++ b/damus/Nostr/CoreData/Damus.xcdatamodeld/Damus.xcdatamodel/contents @@ -1,5 +1,5 @@ - + @@ -9,6 +9,7 @@ + diff --git a/damus/Nostr/CoreData/PersistedProfile.swift b/damus/Nostr/CoreData/PersistedProfile.swift index 4d8a037a..6a1b0790 100644 --- a/damus/Nostr/CoreData/PersistedProfile.swift +++ b/damus/Nostr/CoreData/PersistedProfile.swift @@ -20,7 +20,8 @@ final class PersistedProfile: NSManagedObject { @NSManaged var lud06: String? @NSManaged var lud16: String? @NSManaged var nip05: String? - @NSManaged var last_update: Date? + @NSManaged var last_update: Date? // The date that the profile was last updated by the user + @NSManaged var network_pull_date: Date? // The date we got this profile from a relay (for staleness checking) func copyValues(from profile: Profile) { name = profile.name diff --git a/damus/Nostr/ProfileDatabase.swift b/damus/Nostr/ProfileDatabase.swift index 66df42f8..c16491a1 100644 --- a/damus/Nostr/ProfileDatabase.swift +++ b/damus/Nostr/ProfileDatabase.swift @@ -99,6 +99,7 @@ final class ProfileDatabase { } persisted_profile?.copyValues(from: profile) persisted_profile?.last_update = last_update + persisted_profile?.network_pull_date = Date.now try context.save() }