fix entry deletion bug

This commit is contained in:
Antelle 2015-11-19 08:55:45 +03:00
parent 4248b21605
commit a2e2aee3e2
3 changed files with 7 additions and 0 deletions

View File

@ -215,6 +215,10 @@ var EntryModel = Backbone.Model.extend({
},
moveToTrash: function() {
this.file.setModified();
if (this.isJustCreated) {
this.isJustCreated = false;
}
this.file.db.remove(this.entry);
this.group.removeEntry(this);
var trashGroup = this.file.getTrashGroup();
@ -225,6 +229,7 @@ var EntryModel = Backbone.Model.extend({
},
deleteFromTrash: function() {
this.file.setModified();
this.file.db.move(this.entry, null);
this.group.removeEntry(this);
},

View File

@ -150,6 +150,7 @@ var GroupModel = MenuItemModel.extend({
if (!object || object.id === this.id || object.file !== this.file) {
return;
}
this.file.setModified();
if (object instanceof GroupModel) {
if (this.group.groups.indexOf(object.group) >= 0) {
return;

View File

@ -8,6 +8,7 @@ Locking, better Dropbox, security enhancements, bugfixes
`+` Dropbox notification in self-hosted apps
`+` option to check updates without install
`+` clear clipboard password after timeout
`-` entry deletion didn't mark file as modified
##### v0.3.0 (2015-11-14)
Auto-update