mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-18 02:08:16 +00:00
Compare commits
3 Commits
13ff3f5728
...
4813e7a871
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4813e7a871 | ||
![]() |
74fc4dbacf | ||
![]() |
05d22797b5 |
|
@ -62,7 +62,11 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_statuses
|
def set_statuses
|
||||||
@statuses = Admin::StatusFilter.new(@account, filter_params).results.preload(:application, :preloadable_poll, :media_attachments, active_mentions: :account, reblog: [:account, :application, :preloadable_poll, :media_attachments, active_mentions: :account]).page(params[:page]).per(PER_PAGE)
|
@statuses = Admin::StatusFilter.new(@account, {}).results.preload(*preload_columns, reblog: [:account, *preload_columns]).page(params[:page]).per(PER_PAGE)
|
||||||
|
end
|
||||||
|
|
||||||
|
def preload_columns
|
||||||
|
[:application, :preloadable_poll, :media_attachments, active_mentions: :account]
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter_params
|
def filter_params
|
||||||
|
|
|
@ -2848,7 +2848,6 @@ a.account__display-name {
|
||||||
&__pane {
|
&__pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: none;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
min-width: 285px;
|
min-width: 285px;
|
||||||
|
@ -2860,7 +2859,6 @@ a.account__display-name {
|
||||||
&__inner {
|
&__inner {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 285px;
|
width: 285px;
|
||||||
pointer-events: auto;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,19 @@ class Status < ApplicationRecord
|
||||||
include Status::ThreadingConcern
|
include Status::ThreadingConcern
|
||||||
include Status::Visibility
|
include Status::Visibility
|
||||||
|
|
||||||
|
CACHEABLE_ASSOCIATIONS = [
|
||||||
|
:application,
|
||||||
|
:conversation,
|
||||||
|
:media_attachments,
|
||||||
|
:preloadable_poll,
|
||||||
|
:status_stat,
|
||||||
|
:tags,
|
||||||
|
account: [:account_stat, user: :role],
|
||||||
|
active_mentions: :account,
|
||||||
|
preview_cards_status: { preview_card: { author_account: [:account_stat, user: :role] } },
|
||||||
|
quote: { status: { account: [:account_stat, user: :role] } },
|
||||||
|
].freeze
|
||||||
|
|
||||||
MEDIA_ATTACHMENTS_LIMIT = 4
|
MEDIA_ATTACHMENTS_LIMIT = 4
|
||||||
|
|
||||||
QUOTE_APPROVAL_POLICY_FLAGS = {
|
QUOTE_APPROVAL_POLICY_FLAGS = {
|
||||||
|
@ -162,29 +175,11 @@ class Status < ApplicationRecord
|
||||||
# the `dependent: destroy` callbacks remove relevant records
|
# the `dependent: destroy` callbacks remove relevant records
|
||||||
before_destroy :unlink_from_conversations!, prepend: true
|
before_destroy :unlink_from_conversations!, prepend: true
|
||||||
|
|
||||||
cache_associated :application,
|
cache_associated(
|
||||||
:media_attachments,
|
*CACHEABLE_ASSOCIATIONS,
|
||||||
:conversation,
|
reblog: [*CACHEABLE_ASSOCIATIONS],
|
||||||
:status_stat,
|
thread: :account
|
||||||
:tags,
|
)
|
||||||
:preloadable_poll,
|
|
||||||
quote: { status: { account: [:account_stat, user: :role] } },
|
|
||||||
preview_cards_status: { preview_card: { author_account: [:account_stat, user: :role] } },
|
|
||||||
account: [:account_stat, user: :role],
|
|
||||||
active_mentions: :account,
|
|
||||||
reblog: [
|
|
||||||
:application,
|
|
||||||
:media_attachments,
|
|
||||||
:conversation,
|
|
||||||
:status_stat,
|
|
||||||
:tags,
|
|
||||||
:preloadable_poll,
|
|
||||||
quote: { status: { account: [:account_stat, user: :role] } },
|
|
||||||
preview_cards_status: { preview_card: { author_account: [:account_stat, user: :role] } },
|
|
||||||
account: [:account_stat, user: :role],
|
|
||||||
active_mentions: :account,
|
|
||||||
],
|
|
||||||
thread: :account
|
|
||||||
|
|
||||||
delegate :domain, :indexable?, to: :account, prefix: true
|
delegate :domain, :indexable?, to: :account, prefix: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user