Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `app/controllers/admin/dashboard_controller.rb`:
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
- `app/views/admin/dashboard/index.html.haml`
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
This commit is contained in:
Claire
2021-10-14 20:55:16 +02:00
52 changed files with 1690 additions and 290 deletions

View File

@ -76,7 +76,7 @@ class Admin::ActionLogFilter
when 'account_id'
Admin::ActionLog.where(account_id: value)
when 'target_account_id'
account = Account.find(value)
account = Account.find_or_initialize_by(id: value)
Admin::ActionLog.where(target: [account, account.user].compact)
else
raise "Unknown filter: #{key}"

View File

@ -494,7 +494,7 @@ class Status < ApplicationRecord
end
def decrement_counter_caches
return if direct_visibility?
return if direct_visibility? || new_record?
account&.decrement_count!(:statuses_count)
reblog&.decrement_count!(:reblogs_count) if reblog?