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:
lilia 2015-05-26 13:28:43 -07:00
parent 53a9ab4834
commit 405e67c758
4 changed files with 50 additions and 65 deletions

View file

@ -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
});
}
});
})();