mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: no need to cap new and unread together anymore
- leave unread alone - cap new at 500 per site, with a site setting
This commit is contained in:
@ -300,9 +300,6 @@ class ApplicationController < ActionController::Base
|
||||
def preload_current_user_data
|
||||
store_preloaded("currentUser", MultiJson.dump(CurrentUserSerializer.new(current_user, scope: guardian, root: false)))
|
||||
report = TopicTrackingState.report(current_user.id)
|
||||
if report.length >= SiteSetting.max_tracked_new_unread.to_i
|
||||
TopicUser.cap_unread_later(current_user.id)
|
||||
end
|
||||
serializer = ActiveModel::ArraySerializer.new(report, each_serializer: TopicTrackingStateSerializer)
|
||||
store_preloaded("topicTrackingStates", MultiJson.dump(serializer))
|
||||
end
|
||||
|
Reference in New Issue
Block a user