Metadata screen
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class ProfileModel: ObservableObject {
|
||||
class ProfileModel: ObservableObject, Equatable {
|
||||
@Published var events: [NostrEvent] = []
|
||||
@Published var contacts: NostrEvent? = nil
|
||||
@Published var following: Int = 0
|
||||
@@ -31,6 +31,14 @@ class ProfileModel: ObservableObject {
|
||||
self.damus = damus
|
||||
}
|
||||
|
||||
static func == (lhs: ProfileModel, rhs: ProfileModel) -> Bool {
|
||||
return lhs.pubkey == rhs.pubkey
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(pubkey)
|
||||
}
|
||||
|
||||
func unsubscribe() {
|
||||
print("unsubscribing from profile \(pubkey) with sub_id \(sub_id)")
|
||||
damus.pool.unsubscribe(sub_id: sub_id)
|
||||
|
||||
Reference in New Issue
Block a user