mirror of
https://github.com/discourse/discourse.git
synced 2025-05-12 15:53:09 +08:00
Reply button at bottom of topic doesn't ask you to abandon your post when you click it more than once
This commit is contained in:
parent
cc60343d31
commit
3c322e6d3d
@ -135,12 +135,19 @@ Discourse.TopicController = Discourse.ObjectController.extend({
|
|||||||
|
|
||||||
// Topic related
|
// Topic related
|
||||||
reply: function() {
|
reply: function() {
|
||||||
this.get('controllers.composer').open({
|
var composerController = this.get('controllers.composer');
|
||||||
topic: this.get('content'),
|
if (composerController.get('content.topic.id') === this.get('content.id') &&
|
||||||
action: Discourse.Composer.REPLY,
|
composerController.get('content.action') === Discourse.Composer.REPLY) {
|
||||||
draftKey: this.get('content.draft_key'),
|
composerController.set('content.post', null);
|
||||||
draftSequence: this.get('content.draft_sequence')
|
composerController.set('content.composeState', Discourse.Composer.OPEN);
|
||||||
});
|
} else {
|
||||||
|
composerController.open({
|
||||||
|
topic: this.get('content'),
|
||||||
|
action: Discourse.Composer.REPLY,
|
||||||
|
draftKey: this.get('content.draft_key'),
|
||||||
|
draftSequence: this.get('content.draft_sequence')
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleParticipant: function(user) {
|
toggleParticipant: function(user) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user