about summary refs log tree commit diff
path: root/app/lib/user_settings_decorator.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-08-12 15:31:20 +0200
committerThibG <thib@sitedethib.com>2019-08-12 23:01:37 +0200
commit597ea5687a3601c6cc462831bf570bae05b08240 (patch)
treeb95cc1a5d557e80b1f59c0aa72851fbc19649468 /app/lib/user_settings_decorator.rb
parentcf421bafdf644f8c8a44b4f06f82841cbd568cdf (diff)
Add option to disable emoji replacements
Fixes #647

The option is found in `/settings` (because that was easier to write it this
way) but only affects the glitch-soc front-end.
Diffstat (limited to 'app/lib/user_settings_decorator.rb')
-rw-r--r--app/lib/user_settings_decorator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb
index a52172707..c822d54de 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -29,6 +29,7 @@ class UserSettingsDecorator
     user.settings['expand_spoilers']     = expand_spoilers_preference if change?('setting_expand_spoilers')
     user.settings['reduce_motion']       = reduce_motion_preference if change?('setting_reduce_motion')
     user.settings['system_font_ui']      = system_font_ui_preference if change?('setting_system_font_ui')
+    user.settings['system_emoji_font']   = system_emoji_font_preference if change?('setting_system_emoji_font')
     user.settings['noindex']             = noindex_preference if change?('setting_noindex')
     user.settings['hide_followers_count']= hide_followers_count_preference if change?('setting_hide_followers_count')
     user.settings['flavour']             = flavour_preference if change?('setting_flavour')
@@ -79,6 +80,10 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_system_font_ui'
   end
 
+  def system_emoji_font_preference
+    boolean_cast_setting 'setting_system_emoji_font'
+  end
+
   def auto_play_gif_preference
     boolean_cast_setting 'setting_auto_play_gif'
   end