Fix rubocop warnings (#2206)

This commit is contained in:
Claire
2023-05-07 15:06:15 +02:00
committed by GitHub
parent 6f64c79ca4
commit 9b59748679
2 changed files with 13 additions and 8 deletions

View File

@@ -64,14 +64,16 @@ class PostStatusService < BaseService
def fill_blank_text!
return unless @text.blank? && @options[:spoiler_text].present?
if @media&.any?(&:video?) || @media&.any?(&:gifv?)
@text = '📹'
elsif @media&.any?(&:audio?)
@text = '🎵'
elsif @media&.any?(&:image?)
@text = '🖼'
else
@text = '.'
@text = begin
if @media&.any?(&:video?) || @media&.any?(&:gifv?)
'📹'
elsif @media&.any?(&:audio?)
'🎵'
elsif @media&.any?(&:image?)
'🖼'
else
'.'
end
end
end