mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-25 16:24:00 +00:00
Compact status_ids in StatusRelationshipsPresenter (#5073)
This commit is contained in:
parent
e756c4f5ec
commit
ab625c57ce
|
@ -11,7 +11,7 @@ class StatusRelationshipsPresenter
|
||||||
@pins_map = {}
|
@pins_map = {}
|
||||||
else
|
else
|
||||||
statuses = statuses.compact
|
statuses = statuses.compact
|
||||||
status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq
|
status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq.compact
|
||||||
conversation_ids = statuses.map(&:conversation_id).compact.uniq
|
conversation_ids = statuses.map(&:conversation_id).compact.uniq
|
||||||
pinnable_status_ids = statuses.map(&:proper).select { |s| s.account_id == current_account_id && %w(public unlisted).include?(s.visibility) }.map(&:id)
|
pinnable_status_ids = statuses.map(&:proper).select { |s| s.account_id == current_account_id && %w(public unlisted).include?(s.visibility) }.map(&:id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue