Add an app event for when a topic is fully loaded
If we are interested in page events (say analytics), they are reported when the route changes, which does not wait for any promises in `setupController` to finish. A plugin might want to know when a topic has fully loaded, so this event is triggered when that happens.
This commit is contained in:
parent
615039f228
commit
847f48a9d0
|
@ -52,6 +52,7 @@ export default Discourse.Route.extend({
|
|||
enteredAt: new Date().getTime().toString()
|
||||
});
|
||||
|
||||
this.appEvents.trigger("page:topic-loaded", topic);
|
||||
topicController.subscribe();
|
||||
|
||||
// Highlight our post after the next render
|
||||
|
|
Loading…
Reference in New Issue