Add more stuff to client

This commit is contained in:
Jon Staab
2026-05-05 09:15:31 -07:00
parent e0e9ad5834
commit 28339976b9
12 changed files with 843 additions and 19 deletions
+8 -3
View File
@@ -71,9 +71,7 @@ export class Repository extends Emitter {
return Array.from(this.eventsById.values())
}
load = (events: TrustedEvent[]) => {
const stale = new Set(this.eventsById.keys())
clear = () => {
this.eventsById.clear()
this.eventsByAddress.clear()
this.eventsByTag.clear()
@@ -82,6 +80,13 @@ export class Repository extends Emitter {
this.eventsByKind.clear()
this.deletes.clear()
this.expired.clear()
this.emit("clear")
}
load = (events: TrustedEvent[]) => {
const stale = new Set(this.eventsById.keys())
this.clear()
const added = []