remove identical function

This commit is contained in:
Bryan Montz
2023-05-15 07:33:49 -05:00
parent 32431096f5
commit bc315dd571
2 changed files with 1 additions and 15 deletions

View File

@@ -57,7 +57,7 @@ class FollowersModel: ObservableObject {
func load_profiles(relay_id: String) {
var filter = NostrFilter.filter_profiles
let authors = find_profiles_to_fetch_pk(profiles: damus_state.profiles, event_pubkeys: contacts ?? [])
let authors = find_profiles_to_fetch_from_keys(profiles: damus_state.profiles, pks: contacts ?? [])
if authors.isEmpty {
return
}

View File

@@ -90,20 +90,6 @@ class SearchHomeModel: ObservableObject {
}
}
func find_profiles_to_fetch_pk(profiles: Profiles, event_pubkeys: [String]) -> [String] {
var pubkeys = Set<String>()
for pk in event_pubkeys {
if profiles.lookup(id: pk) != nil {
continue
}
pubkeys.insert(pk)
}
return Array(pubkeys)
}
func find_profiles_to_fetch(profiles: Profiles, load: PubkeysToLoad, cache: EventCache) -> [String] {
switch load {
case .from_events(let events):