Separate media_attachments property

This commit is contained in:
KMY 2023-04-08 09:35:23 +09:00
parent 51e8eddbb4
commit 0b9151859d
3 changed files with 18 additions and 5 deletions

View file

@ -293,6 +293,14 @@ class Status < ApplicationRecord
end
end
def ordered_media_attachments_original_mastodon
ordered_media_attachments.take(4)
end
def ordered_media_attachments_extra
ordered_media_attachments.drop(4).take(4)
end
def replies_count
status_stat&.replies_count || 0
end