Merge inbox and panel controllers
These collections should always be operating with the same model instances, so let the inbox reset it self from the same in-memory cache of conversation models used by the conversation windows.
This commit is contained in:
parent
53a9ab4834
commit
405e67c758
4 changed files with 50 additions and 65 deletions
|
@ -277,6 +277,20 @@
|
|||
only: number
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
fetchActive: function() {
|
||||
// Ensures all active conversations are included in this collection,
|
||||
// and updates their attributes, but removes nothing.
|
||||
return this.fetch({
|
||||
index: {
|
||||
name: 'inbox', // 'inbox' index on active_at
|
||||
order: 'desc' // ORDER timestamp DESC
|
||||
// TODO pagination/infinite scroll
|
||||
// limit: 10, offset: page*10,
|
||||
},
|
||||
remove: false
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue