Skip to content

Commit

Permalink
collection: remove obsolete card locking
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Feb 3, 2024
1 parent 6c6d142 commit a67f225
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class Collection {
static collection = {}
static folder = ''

cardlock = {}

/* set collection to a folder */
async set (folder, force) {
if (!force && folder === this.folder) return
Expand Down Expand Up @@ -88,12 +86,6 @@ class Collection {
const request = card
const oldurl = card.fsurl

// ignore already pending existing cards
if (oldurl) {
if (this.cardlock[oldurl]) return request
this.cardlock[oldurl] = true
}

// write current collection path
card.collection = this.folder

Expand All @@ -106,8 +98,7 @@ class Collection {
// reload collection and return card
if (card) await this.reload(card, oldurl)

// remove lock and return
if (oldurl) delete this.cardlock[oldurl]
// return updated card
return card || request
}

Expand Down

0 comments on commit a67f225

Please sign in to comment.