perf: don't continuously attempt to fetch old profiles

Changelog-Changed: Save bandwidth by only fetching new profiles after a certain amount of time
This commit is contained in:
William Casarin
2023-10-23 10:31:47 +08:00
parent bbccc27a26
commit 76508dbbfd
12 changed files with 86 additions and 48 deletions
+2 -1
View File
@@ -64,7 +64,8 @@ class EventsModel: ObservableObject {
case .ok:
break
case .eose:
load_profiles(profiles_subid: profiles_id, relay_id: relay_id, load: .from_events(events), damus_state: state)
let txn = NdbTxn(ndb: self.state.ndb)
load_profiles(profiles_subid: profiles_id, relay_id: relay_id, load: .from_events(events), damus_state: state, txn: txn)
}
}
}