FIX: Wasn't jumping to new topic

This commit is contained in:
Robin Ward 2016-02-12 13:19:00 -05:00
parent d08007f505
commit 776020cc8a
1 changed files with 8 additions and 0 deletions

View File

@ -301,6 +301,14 @@ export default Ember.Controller.extend({
currentUser.set('reply_count', currentUser.get('reply_count') + 1);
}
const disableJumpReply = Discourse.User.currentProp('disable_jump_reply');
if (!composer.get('replyingToTopic') || !disableJumpReply) {
const post = result.target;
if (post && !staged) {
DiscourseURL.routeTo(post.get('url'));
}
}
}).catch(function(error) {
composer.set('disableDrafts', false);
self.appEvents.one('composer:opened', () => bootbox.alert(error));