Notify when clearing repository

This commit is contained in:
Jon Staab
2024-06-12 13:34:25 -07:00
parent 39ca2fe6aa
commit 488b8a7f2a
+4
View File
@@ -46,6 +46,8 @@ export class Repository extends Emitter {
}
clear = () => {
const removed = new Set(this.eventsById.keys())
this.eventsById.clear()
this.eventsByWrap.clear()
this.eventsByAddress.clear()
@@ -53,6 +55,8 @@ export class Repository extends Emitter {
this.eventsByDay.clear()
this.eventsByAuthor.clear()
this.deletes.clear()
this.emit('update', {added: [], removed})
}
// API