mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: simplify remove from all notebooks logic
This commit is contained in:
@@ -387,13 +387,9 @@ export class Notes implements ICollection {
|
||||
}
|
||||
|
||||
async removeFromAllNotebooks(...noteIds: string[]) {
|
||||
await this.db.transaction(async () => {
|
||||
for (const noteId of noteIds) {
|
||||
await this.db.relations
|
||||
.to({ type: "note", id: noteId }, "notebook")
|
||||
.unlink();
|
||||
}
|
||||
});
|
||||
await this.db.relations
|
||||
.to({ type: "note", ids: noteIds }, "notebook")
|
||||
.unlink();
|
||||
}
|
||||
|
||||
async contentBlocks(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user