discourse/app/assets/javascripts/discourse/routes/topic-unsubscribe.js.es6
2015-12-07 14:21:07 -05:00

20 lines
459 B
JavaScript

import { loadTopicView } from 'discourse/models/topic';
export default Discourse.Route.extend({
model(params) {
const topic = this.store.createRecord("topic", { id: params.id });
return loadTopicView(topic).then(() => topic);
},
afterModel(topic) {
topic.set("details.notificationReasonText", null);
},
actions: {
didTransition() {
this.controllerFor("application").set("showFooter", true);
return true;
}
}
});