Move index querying logic to /models

This commit is contained in:
lilia 2014-12-19 12:55:29 -08:00
parent 6cbde7894a
commit cfd4ccc803
3 changed files with 29 additions and 21 deletions

View file

@ -32,15 +32,7 @@
collection : this.conversations
});
this.conversations.fetch({
index: {
name: 'inbox', // 'inbox' index on active_at
order: 'desc' // ORDER timestamp DESC
},
reset: true
// TODO pagination/infinite scroll
// limit: 10, offset: page*10,
}).then(function() {
this.conversations.fetchActive({reset: true}).then(function() {
if (this.conversations.length) {
this.conversations.at(0).trigger('render');
}