From baae2a4b7c647a2bb350fff7e3db27108fe5c77c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 8 Jun 2016 14:08:19 -0400 Subject: [PATCH] FIX: Don't update the last read post when disable jump reply is set --- lib/post_creator.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/post_creator.rb b/lib/post_creator.rb index 47d154037..0a6075155 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -413,18 +413,20 @@ class PostCreator def track_topic return if @opts[:auto_track] == false - TopicUser.change(@post.user_id, - @topic.id, - posted: true, - last_read_post_number: @post.post_number, - highest_seen_post_number: @post.post_number) + unless @user.user_option.disable_jump_reply? + TopicUser.change(@post.user_id, + @topic.id, + posted: true, + last_read_post_number: @post.post_number, + highest_seen_post_number: @post.post_number) - # assume it took us 5 seconds of reading time to make a post - PostTiming.record_timing(topic_id: @post.topic_id, - user_id: @post.user_id, - post_number: @post.post_number, - msecs: 5000) + # assume it took us 5 seconds of reading time to make a post + PostTiming.record_timing(topic_id: @post.topic_id, + user_id: @post.user_id, + post_number: @post.post_number, + msecs: 5000) + end if @user.staged TopicUser.auto_watch(@user.id, @topic.id)