Closed xiangcy closed 8 years ago
You need to listen on events emitted by the deletedNotes collection. That is, you'll need to add something like the following to the TrashPageView:
this.listenTo(this.collection, "add", function(model, collection) {
// Display the note.
});
this.listenTo(this.collection, "remove", function(model, collection) {
// Remove the note's view.
});
Trashbin working on webapp and Firefox. Still need to mitigate issues synchronizing with servers.
Currently the implementation does not consider race condition. So a destroy will overwrite all updates on another session.
Code fixes and also race condition implementation so that future updates overwrite the destroy.
fix the problem above
BETA version for Chrome version trash bin. People can restore their deleted notes. A current problem is that when a user restore a note, the note will show up in the sidebar immediately; however, when a user delete a note, the note will not show up on the trashbin page. Steven, do you know how to fix it?