From 6614d42c6e3aedd51b0e9b2a2bb5d6f0a19fcad0 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 25 Mar 2019 03:06:19 -0500 Subject: hidden accounts + stats hiding --- app/models/account.rb | 1 + app/models/user.rb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/account.rb b/app/models/account.rb index 48d664934..28a7aa500 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -45,6 +45,7 @@ # also_known_as :string is an Array # silenced_at :datetime # suspended_at :datetime +# hidden :boolean # class Account < ApplicationRecord diff --git a/app/models/user.rb b/app/models/user.rb index b581a9a4b..e2be2ce9e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -103,7 +103,7 @@ 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, - :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, :hide_followers_count, + :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 attr_reader :invite_code @@ -200,6 +200,10 @@ class User < ApplicationRecord settings.rawr_federated || false end + def setting_hide_stats + settings.hide_stats || false + end + def allows_digest_emails? settings.notification_emails['digest'] end -- cgit