mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-12 00:31:48 -05:00
20 lines
506 B
JavaScript
20 lines
506 B
JavaScript
import { loadTopicView } from "discourse/models/post-stream";
|
|
|
|
export default Discourse.Route.extend({
|
|
model(params) {
|
|
const topic = this.store.createRecord("topic", { id: params.id });
|
|
return loadTopicView(topic).then(() => topic);
|
|
},
|
|
|
|
afterModel(topic) {
|
|
// hide the notification reason text
|
|
topic.set("details.notificationReasonText", null);
|
|
},
|
|
|
|
actions: {
|
|
didTransition() {
|
|
this.controllerFor("application").set("showFooter", true);
|
|
return true;
|
|
}
|
|
}
|
|
});
|