FIX: Double header rendering issues, redux
This commit is contained in:
parent
94cee37edd
commit
b22df9f166
|
@ -92,17 +92,18 @@ export default Ember.Component.extend(CleansUp, {
|
|||
this.appEvents.off('topic-entrance:show');
|
||||
},
|
||||
|
||||
_jumpTo(destination) {
|
||||
this.cleanUp();
|
||||
DiscourseURL.routeTo(destination);
|
||||
},
|
||||
|
||||
actions: {
|
||||
enterTop() {
|
||||
const topic = this.get('topic');
|
||||
this.appEvents.trigger('header:update-topic', topic);
|
||||
DiscourseURL.routeTo(topic.get('url'));
|
||||
this._jumpTo(this.get('topic.url'));
|
||||
},
|
||||
|
||||
enterBottom() {
|
||||
const topic = this.get('topic');
|
||||
this.appEvents.trigger('header:update-topic', topic);
|
||||
DiscourseURL.routeTo(topic.get('lastPostUrl'));
|
||||
this._jumpTo(this.get('topic.lastPostUrl'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -218,6 +218,10 @@ const TopicRoute = Discourse.Route.extend({
|
|||
|
||||
// We reset screen tracking every time a topic is entered
|
||||
this.screenTrack.start(model.get('id'), controller);
|
||||
|
||||
Ember.run.scheduleOnce('afterRender', () => {
|
||||
this.appEvents.trigger('header:update-topic', model);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue