mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: When viewing a summary, if a post jumps to the bottom cancel it.
This commit is contained in:
parent
332bf311c7
commit
95854a94c9
2 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue