0
0
Fork 0

Remove remnants of embed views (#32419)

This commit is contained in:
Matt Jankowski 2024-11-16 15:48:10 -05:00 committed by GitHub
parent 44d92fa4f6
commit a1ac2a73ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 70 deletions

View file

@ -1,9 +1,6 @@
# frozen_string_literal: true
module StatusesHelper
EMBEDDED_CONTROLLER = 'statuses'
EMBEDDED_ACTION = 'embed'
VISIBLITY_ICONS = {
public: 'globe',
unlisted: 'lock_open',
@ -60,18 +57,10 @@ module StatusesHelper
components.compact_blank.join("\n\n")
end
def stream_link_target
embedded_view? ? '_blank' : nil
end
def visibility_icon(status)
VISIBLITY_ICONS[status.visibility.to_sym]
end
def embedded_view?
params[:controller] == EMBEDDED_CONTROLLER && params[:action] == EMBEDDED_ACTION
end
def prefers_autoplay?
ActiveModel::Type::Boolean.new.cast(params[:autoplay]) || current_user&.setting_auto_play_gif
end