diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 6022a5eb0..b9e18eecd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -95,8 +95,8 @@ class User < ApplicationRecord has_many :session_activations, dependent: :destroy delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal, - :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_sensitive_media, :hide_network, - :default_language, to: :settings, prefix: :setting, allow_nil: false + :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, + :expand_spoilers, :default_language, to: :settings, prefix: :setting, allow_nil: false attr_reader :invite_code @@ -316,6 +316,14 @@ class User < ApplicationRecord super end + def show_all_media? + setting_display_media == 'show_all' + end + + def hide_all_media? + setting_display_media == 'hide_all' + end + protected def send_devise_notification(notification, *args) |