Move message and conversation storage to IndexedDB
Getting up and running with IndexedDB was pretty easy, thanks to backbone. The tricky part was making reads and writes asynchronous. In that process I did some refactoring on Whisper.Threads, which has been renamed Conversations for consistency with the view names. This change also adds the unlimitedStorage permission.
This commit is contained in:
parent
5638b20046
commit
ced295a630
24 changed files with 1663 additions and 324 deletions
|
@ -13,5 +13,12 @@ var Whisper = Whisper || {};
|
|||
scrollToBottom: function() {
|
||||
this.$el.scrollTop(this.el.scrollHeight);
|
||||
},
|
||||
addAll: function() {
|
||||
this.$el.html('');
|
||||
this.collection.each(function(model) {
|
||||
var view = new this.itemView({model: model});
|
||||
this.$el.prepend(view.render().el);
|
||||
});
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue