1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Improve "jump to last" scrolling behaviour

This commit is contained in:
Toby Zerner
2015-01-30 13:05:42 +10:30
parent 12622e6c28
commit 5edc3eba83
4 changed files with 27 additions and 10 deletions

View File

@@ -56,7 +56,7 @@ export default Ember.View.extend(Ember.Evented, {
// ------------------------------------------------------------------------
// Whenever the controller has switched out the old discussion model for a
// new one, we want to
// new one, we want to begin loading posts according to the ?start param.
loadStreamContentForNewDiscussion: function() {
if (this.get('controller.loaded')) {
this.goToNumber(this.get('controller.start'));
@@ -93,7 +93,7 @@ export default Ember.View.extend(Ember.Evented, {
label: 'Reply',
icon: 'reply',
action: function() {
view.get('streamContent').send('goToIndex', view.get('controller.stream.count') - 1);
view.get('streamContent').send('goToLast');
view.get('controller').send('reply');
},
});