1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-20 06:56:40 +02:00

Merge pull request #1151 from kee-org/fix-emptying-trash-unreliable

Improve reliability of emptying trash
This commit is contained in:
antelle 2019-03-30 20:30:59 +01:00 committed by GitHub
commit a49eaa2103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -575,10 +575,11 @@ const FileModel = Backbone.Model.extend({
this.db.move(group, null);
modified = true;
}, this);
trashGroup.group.entries.forEach(function(entry) {
trashGroup.group.entries.slice().forEach(function(entry) {
this.db.move(entry, null);
modified = true;
}, this);
trashGroup.get('items').reset();
trashGroup.get('entries').reset();
if (modified) {
this.setModified();