Change language opt-out to language opt-in (#7823)
* Switch filtered_languages to chosen_languages * Adjust interface * Remove unused translations
This commit is contained in:
parent
31e5d7efd7
commit
7eec279c7f
41 changed files with 32 additions and 113 deletions
|
@ -190,8 +190,8 @@ class Status < ApplicationRecord
|
|||
before_validation :set_local
|
||||
|
||||
class << self
|
||||
def not_in_filtered_languages(account)
|
||||
where(language: nil).or where.not(language: account.filtered_languages)
|
||||
def in_chosen_languages(account)
|
||||
where(language: nil).or where(language: account.chosen_languages)
|
||||
end
|
||||
|
||||
def as_home_timeline(account)
|
||||
|
@ -333,7 +333,7 @@ class Status < ApplicationRecord
|
|||
def filter_timeline_for_account(query, account, local_only)
|
||||
query = query.not_excluded_by_account(account)
|
||||
query = query.not_domain_blocked_by_account(account) unless local_only
|
||||
query = query.not_in_filtered_languages(account) if account.filtered_languages.present?
|
||||
query = query.in_chosen_languages(account) if account.chosen_languages.present?
|
||||
query.merge(account_silencing_filter(account))
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue