diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js index 2f7f582220d..63ca0a53ce5 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic.js +++ b/app/assets/javascripts/discourse/app/controllers/topic.js @@ -457,18 +457,6 @@ export default Controller.extend(bufferedProperty("model"), { }); }, - buildQuoteMarkdown() { - const { postId, buffer, opts } = this.quoteState; - const loadedPost = this.get("model.postStream").findLoadedPost(postId); - const promise = loadedPost - ? Promise.resolve(loadedPost) - : this.get("model.postStream").loadPost(postId); - - return promise.then((post) => { - return buildQuote(post, buffer, opts); - }); - }, - fillGapBefore(args) { return this.get("model.postStream").fillGapBefore(args.post, args.gap); }, @@ -1562,6 +1550,19 @@ export default Controller.extend(bufferedProperty("model"), { this.model.recover(); }, + @action + buildQuoteMarkdown() { + const { postId, buffer, opts } = this.quoteState; + const loadedPost = this.get("model.postStream").findLoadedPost(postId); + const promise = loadedPost + ? Promise.resolve(loadedPost) + : this.get("model.postStream").loadPost(postId); + + return promise.then((post) => { + return buildQuote(post, buffer, opts); + }); + }, + deleteTopic(opts = {}) { if (opts.force_destroy) { return this.model.destroy(this.currentUser, opts);