mirror of
https://github.com/discourse/discourse.git
synced 2025-06-18 00:53:47 +08:00
FIX: buildQuoteMarkdown fn was not passed down properly (#24360)
Followup to d128dc0e6141e3a813971742f366337432ca9b31, I swear I tried this locally and it worked, but it turns out it didn't. Need to keep the `action "function"` syntax here.
This commit is contained in:
@ -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) {
|
fillGapBefore(args) {
|
||||||
return this.get("model.postStream").fillGapBefore(args.post, args.gap);
|
return this.get("model.postStream").fillGapBefore(args.post, args.gap);
|
||||||
},
|
},
|
||||||
@ -1562,6 +1550,19 @@ export default Controller.extend(bufferedProperty("model"), {
|
|||||||
this.model.recover();
|
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 = {}) {
|
deleteTopic(opts = {}) {
|
||||||
if (opts.force_destroy) {
|
if (opts.force_destroy) {
|
||||||
return this.model.destroy(this.currentUser, opts);
|
return this.model.destroy(this.currentUser, opts);
|
||||||
|
Reference in New Issue
Block a user