diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-04-07 23:50:13 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:21 -0500 |
commit | caf265bbebe0fda892ff4fd437f91a17027b8258 (patch) | |
tree | f26c5aae06ee84554d9a8c90747baf6bb0cb9205 /app/models | |
parent | 2ee72d3aaf184c6bd109f96a9d07be5bb89e00c8 (diff) |
add option to toggle captions + code: move monsterpit additons on top
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 |