Add support for deleting a conversation
Note that the conversation record is not actually destroyed, merely marked inactive, preserving the contact name, photo, etc...
This commit is contained in:
parent
7b23e24b71
commit
8257fa7478
4 changed files with 25 additions and 3 deletions
|
@ -32,7 +32,11 @@
|
|||
collection : this.conversations
|
||||
});
|
||||
|
||||
this.conversations.fetch({reset: true}).then(function() {
|
||||
this.conversations.fetch({ reset: true }).then(function() {
|
||||
this.conversations.reset(
|
||||
//TODO: Add an index to support this operation at the db level
|
||||
this.conversations.filter(function(c) { return c.get('active'); })
|
||||
);
|
||||
if (this.conversations.length) {
|
||||
this.conversations.at(0).trigger('render');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue