FIX: Posts weren't highlighting on initial load

This commit is contained in:
Robin Ward 2015-01-23 10:46:04 -05:00
parent c2da725f75
commit 848d60d459

View file

@ -34,7 +34,11 @@ export default Discourse.Route.extend({
progressPosition: progress, progressPosition: progress,
expanded: false expanded: false
}); });
// Highlight our post after the next render
Ember.run.scheduleOnce('afterRender', function() {
self.appEvents.trigger('post:highlight', closest); self.appEvents.trigger('post:highlight', closest);
});
Discourse.URL.jumpToPost(closest); Discourse.URL.jumpToPost(closest);
if (topic.present('draft')) { if (topic.present('draft')) {