refactor: add Pubkey, Privkey, NoteId string aliases

This is a non-behavioral change in preparation for the actual switchover
from Strings to Ids. The purpose of this kit is to reduce the size of
the switchover commit which is going to be very large.
This commit is contained in:
William Casarin
2023-07-31 03:57:26 -07:00
parent f9d21ef901
commit 7040235605
101 changed files with 427 additions and 426 deletions

View File

@@ -14,14 +14,14 @@ class ProfileModel: ObservableObject, Equatable {
@Published var progress: Int = 0
var events: EventHolder
let pubkey: String
let pubkey: Pubkey
let damus: DamusState
var seen_event: Set<String> = Set()
var seen_event: Set<NoteId> = Set()
var sub_id = UUID().description
var prof_subid = UUID().description
init(pubkey: String, damus: DamusState) {
init(pubkey: Pubkey, damus: DamusState) {
self.pubkey = pubkey
self.damus = damus
self.events = EventHolder(on_queue: { ev in
@@ -29,7 +29,7 @@ class ProfileModel: ObservableObject, Equatable {
})
}
func follows(pubkey: String) -> Bool {
func follows(pubkey: Pubkey) -> Bool {
guard let contacts = self.contacts else {
return false
}