Don't show new user education when editing a reply.
This commit is contained in:
parent
ae78954fc0
commit
b1bfda0e11
|
@ -116,6 +116,10 @@ Discourse.ComposerController = Discourse.Controller.extend({
|
||||||
}.property('content.composeState', 'content.reply', 'educationClosed', 'educationContents'),
|
}.property('content.composeState', 'content.reply', 'educationClosed', 'educationContents'),
|
||||||
|
|
||||||
fetchNewUserEducation: function() {
|
fetchNewUserEducation: function() {
|
||||||
|
|
||||||
|
// We don't show education when editing a post.
|
||||||
|
if (this.get('content.editingPost')) return;
|
||||||
|
|
||||||
// If creating a topic, use topic_count, otherwise post_count
|
// If creating a topic, use topic_count, otherwise post_count
|
||||||
var count = this.get('content.creatingTopic') ? Discourse.get('currentUser.topic_count') : Discourse.get('currentUser.reply_count');
|
var count = this.get('content.creatingTopic') ? Discourse.get('currentUser.topic_count') : Discourse.get('currentUser.reply_count');
|
||||||
if (count >= Discourse.SiteSettings.educate_until_posts) {
|
if (count >= Discourse.SiteSettings.educate_until_posts) {
|
||||||
|
|
|
@ -121,6 +121,7 @@ class PostCreator
|
||||||
# Track the topic
|
# Track the topic
|
||||||
TopicUser.auto_track(@user.id, topic.id, TopicUser.notification_reasons[:created_post])
|
TopicUser.auto_track(@user.id, topic.id, TopicUser.notification_reasons[:created_post])
|
||||||
|
|
||||||
|
# We don't count replies to your own topics
|
||||||
if @user.id != topic.user_id
|
if @user.id != topic.user_id
|
||||||
@user.update_topic_reply_count
|
@user.update_topic_reply_count
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue