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:
lilia 2014-11-13 14:35:37 -08:00
parent 5638b20046
commit ced295a630
24 changed files with 1663 additions and 324 deletions

View file

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