FIX: buildQuoteMarkdown fn was not passed down properly (#24360)
Followup to d128dc0e61
,
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:
parent
e5b0493b49
commit
014bb0adb8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue