Rebuild graph edges on changes
This commit is contained in:
@@ -43,6 +43,7 @@ export class MemoryCache {
|
||||
|
||||
add(memory: Memory): void {
|
||||
this.memories.push(memory);
|
||||
rebuildGraph(this.memories);
|
||||
this.rebuild();
|
||||
}
|
||||
|
||||
@@ -53,6 +54,7 @@ export class MemoryCache {
|
||||
} else {
|
||||
this.memories.push(memory);
|
||||
}
|
||||
rebuildGraph(this.memories);
|
||||
this.rebuild();
|
||||
}
|
||||
|
||||
@@ -60,6 +62,7 @@ export class MemoryCache {
|
||||
const idx = this.memories.findIndex(m => m.name === name);
|
||||
if (idx !== -1) {
|
||||
this.memories.splice(idx, 1);
|
||||
rebuildGraph(this.memories);
|
||||
this.rebuild();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user