From caf265bbebe0fda892ff4fd437f91a17027b8258 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 7 Apr 2019 23:50:13 -0500 Subject: add option to toggle captions + code: move monsterpit additons on top --- app/models/user.rb | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'app/models/user.rb') 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 -- cgit