Use separate message collections for each thread to facilitate lookup and lazy loading
This commit is contained in:
parent
d6d17eaf19
commit
ebf1b3352f
3 changed files with 18 additions and 7 deletions
|
@ -36,7 +36,9 @@ var Whisper = Whisper || {};
|
|||
},
|
||||
|
||||
messages: function() {
|
||||
return Whisper.Messages.where({threadId: this.id});
|
||||
var messages = new Whisper.MessageCollection([], {threadId: this.id});
|
||||
messages.fetch();
|
||||
return messages;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue