mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: do not return no_result_help from the server (#15220)
We don't need it anymore. Actually, I removed using of it on the client side a long time ago, when I was working on improving blank page syndrome on user activity pages (see https://github.com/discourse/discourse/pull/14311). This PR also removes some old resource strings that we don't use anymore. We have new strings for blank pages.
This commit is contained in:
committed by
GitHub
parent
a6230b8138
commit
4e8983036a
@@ -16,8 +16,7 @@ class DraftsController < ApplicationController
|
||||
)
|
||||
|
||||
render json: {
|
||||
drafts: stream ? serialize_data(stream, DraftSerializer) : [],
|
||||
no_results_help: I18n.t("user_activity.no_drafts.self")
|
||||
drafts: stream ? serialize_data(stream, DraftSerializer) : []
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -25,20 +25,7 @@ class UserActionsController < ApplicationController
|
||||
}
|
||||
|
||||
stream = UserAction.stream(opts).to_a
|
||||
if stream.empty? && (help_key = params['no_results_help_key'])
|
||||
if user.id == guardian.user.try(:id)
|
||||
help_key += ".self"
|
||||
else
|
||||
help_key += ".others"
|
||||
end
|
||||
render json: {
|
||||
user_action: [],
|
||||
no_results_help: I18n.t(help_key)
|
||||
}
|
||||
else
|
||||
render_serialized(stream, UserActionSerializer, root: 'user_actions')
|
||||
end
|
||||
|
||||
render_serialized(stream, UserActionSerializer, root: 'user_actions')
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@@ -1621,10 +1621,7 @@ class UsersController < ApplicationController
|
||||
|
||||
if bookmark_list.bookmarks.empty?
|
||||
render json: {
|
||||
bookmarks: [],
|
||||
no_results_help: I18n.t(
|
||||
params[:q].present? ? "user_activity.no_bookmarks.search" : "user_activity.no_bookmarks.self"
|
||||
)
|
||||
bookmarks: []
|
||||
}
|
||||
else
|
||||
page = params[:page].to_i + 1
|
||||
|
||||
Reference in New Issue
Block a user