Update in-memory list of circles when removing

This commit is contained in:
SondreB 2023-02-22 14:17:25 +01:00
parent 6f55287cbb
commit d4b0e83e64
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF

View File

@ -88,6 +88,12 @@ export class CircleService {
} }
async delete(id: number) { async delete(id: number) {
const index = this.circles.findIndex((c) => c.id == id);
if (index > -1) {
this.circles.splice(index, 1);
}
await this.db.storage.deleteCircle(id); await this.db.storage.deleteCircle(id);
} }
} }