FIX: quote dropped when replying as new topic
This commit is contained in:
parent
4b919cd735
commit
a74ac90bf5
|
@ -131,9 +131,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||
const composer = this.get('composer');
|
||||
const viewOpen = composer.get('model.viewOpen');
|
||||
|
||||
const quotedText = Quote.build(post, buffer);
|
||||
|
||||
// If we can't create a post, delegate to reply as new topic
|
||||
if ((!viewOpen) && (!this.get('model.details.can_create_post'))) {
|
||||
this.send('replyAsNewTopic', post);
|
||||
this.send('replyAsNewTopic', post, quotedText);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -154,7 +156,6 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||
composerOpts.post = composerPost;
|
||||
}
|
||||
|
||||
const quotedText = Quote.build(post, buffer);
|
||||
composerOpts.quote = quotedText;
|
||||
if (composer.get('model.viewOpen')) {
|
||||
this.appEvents.trigger('composer:insert-block', quotedText);
|
||||
|
@ -623,11 +624,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||
}
|
||||
},
|
||||
|
||||
replyAsNewTopic(post) {
|
||||
replyAsNewTopic(post, quotedText) {
|
||||
const composerController = this.get('composer');
|
||||
|
||||
const { quoteState } = this;
|
||||
const quotedText = Quote.build(post, quoteState.buffer);
|
||||
quotedText = quotedText || Quote.build(post, quoteState.buffer);
|
||||
quoteState.clear();
|
||||
|
||||
var options;
|
||||
|
|
Loading…
Reference in New Issue