refactor: seperate note add & merging

This commit is contained in:
thecodrr
2021-12-20 09:28:17 +05:00
parent 3309b3d643
commit 2e00ba2e8a
3 changed files with 44 additions and 53 deletions

View File

@@ -137,7 +137,7 @@ class Merger {
await this._mergeArray(
notes,
(id) => this._db.notes.note(id),
(item) => this._db.notes.add(item)
(item) => this._db.notes.merge(item)
);
await this._mergeArray(