mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-20 04:07:45 +00:00
Fix rubocop warnings (#2206)
This commit is contained in:
parent
6f64c79ca4
commit
9b59748679
|
@ -225,6 +225,8 @@ Lint/Void:
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Max: 150
|
Max: 150
|
||||||
|
Exclude:
|
||||||
|
- 'app/serializers/initial_state_serializer.rb'
|
||||||
|
|
||||||
# Configuration parameters: CountBlocks, Max.
|
# Configuration parameters: CountBlocks, Max.
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
|
@ -247,6 +249,7 @@ Metrics/ModuleLength:
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
- 'app/helpers/jsonld_helper.rb'
|
||||||
- 'app/models/concerns/account_interactions.rb'
|
- 'app/models/concerns/account_interactions.rb'
|
||||||
- 'app/models/concerns/has_user_settings.rb'
|
- 'app/models/concerns/has_user_settings.rb'
|
||||||
|
- 'lib/sanitize_ext/sanitize_config.rb'
|
||||||
|
|
||||||
# Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
|
# Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
|
||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
|
|
|
@ -64,14 +64,16 @@ class PostStatusService < BaseService
|
||||||
def fill_blank_text!
|
def fill_blank_text!
|
||||||
return unless @text.blank? && @options[:spoiler_text].present?
|
return unless @text.blank? && @options[:spoiler_text].present?
|
||||||
|
|
||||||
if @media&.any?(&:video?) || @media&.any?(&:gifv?)
|
@text = begin
|
||||||
@text = '📹'
|
if @media&.any?(&:video?) || @media&.any?(&:gifv?)
|
||||||
elsif @media&.any?(&:audio?)
|
'📹'
|
||||||
@text = '🎵'
|
elsif @media&.any?(&:audio?)
|
||||||
elsif @media&.any?(&:image?)
|
'🎵'
|
||||||
@text = '🖼'
|
elsif @media&.any?(&:image?)
|
||||||
else
|
'🖼'
|
||||||
@text = '.'
|
else
|
||||||
|
'.'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue