|
|
@ -28,10 +28,12 @@ var Whisper = Whisper || {};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
scrollToBottom: function() {
|
|
|
|
scrollToBottom: function() {
|
|
|
|
// TODO: Avoid scrolling if user has manually scrolled up?
|
|
|
|
// TODO: Avoid scrolling if user has manually scrolled up?
|
|
|
|
|
|
|
|
this.resize();
|
|
|
|
this.$el.scrollTop(this.el.scrollHeight);
|
|
|
|
this.$el.scrollTop(this.el.scrollHeight);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addAll: function() {
|
|
|
|
addAll: function() {
|
|
|
|
Whisper.ListView.prototype.addAll.apply(this, arguments); // super()
|
|
|
|
Whisper.ListView.prototype.addAll.apply(this, arguments); // super()
|
|
|
|
|
|
|
|
this.resize();
|
|
|
|
this.scrollToBottom();
|
|
|
|
this.scrollToBottom();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|