diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index e2be2ce9e..9e611d33f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -102,9 +102,34 @@ class User < ApplicationRecord has_many :session_activations, dependent: :destroy - delegate :auto_play_gif, :default_local, :always_local, :rawr_federated, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal, - :hide_stats, :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, :hide_followers_count, - :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, :default_content_type, to: :settings, prefix: :setting, allow_nil: false + delegate :default_local, + :always_local, + :rawr_federated, + :hide_stats, + :disable_color, + :hide_captions, + :auto_play_gif, + :default_sensitive, + :unfollow_modal, + :boost_modal, + :favourite_modal, + :delete_modal, + :reduce_motion, + :system_font_ui, + :noindex, + :flavour, + :skin, + :display_media, + :hide_network, + :hide_followers_count, + :expand_spoilers, + :default_language, + :aggregate_reblogs, + :show_application, + :default_content_type, + to: :settings, + prefix: :setting, + allow_nil: false attr_reader :invite_code attr_writer :external @@ -204,6 +229,10 @@ class User < ApplicationRecord settings.hide_stats || false end + def setting_hide_captions + settings.hide_captions || false + end + def allows_digest_emails? settings.notification_emails['digest'] end |