mirror of
https://github.com/discourse/discourse.git
synced 2025-05-11 07:18:27 +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
|
||||
reply: function() {
|
||||
this.get('controllers.composer').open({
|
||||
topic: this.get('content'),
|
||||
action: Discourse.Composer.REPLY,
|
||||
draftKey: this.get('content.draft_key'),
|
||||
draftSequence: this.get('content.draft_sequence')
|
||||
});
|
||||
var composerController = this.get('controllers.composer');
|
||||
if (composerController.get('content.topic.id') === this.get('content.id') &&
|
||||
composerController.get('content.action') === Discourse.Composer.REPLY) {
|
||||
composerController.set('content.post', null);
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user