FIX: When viewing a summary, if a post jumps to the bottom cancel it.

This commit is contained in:
Robin Ward 2016-04-13 15:58:37 -04:00
parent 332bf311c7
commit 95854a94c9
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
2 changed files with 7 additions and 0 deletions

View File

@ -217,6 +217,8 @@ const DiscourseURL = Ember.Object.createWithMixins({
if (path.match(/last$/)) { opts.nearPost = topicController.get('model.highest_post_number'); }
const closest = opts.nearPost || 1;
opts.cancelSummary = true;
postStream.refresh(opts).then(() => {
topicController.setProperties({
'model.currentPost': closest,

View File

@ -194,6 +194,11 @@ export default RestModel.extend({
opts = opts || {};
opts.nearPost = parseInt(opts.nearPost, 10);
if (opts.cancelSummary) {
this.set('summary', false);
delete opts.cancelSummary;
}
const topic = this.get('topic');
// Do we already have the post in our list of posts? Jump there.