about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorAtsushi Yamamoto <yamaatsushi927@gmail.com>2017-05-29 11:56:13 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-29 17:56:13 +0200
commit402c19a92475014e04df91eca759225f8a89d2ac (patch)
tree76262cf99e34295d2e9acae0ab7858ff2fdc2796 /app/lib
parentb5e89948441eb245a873260a87bfb49fb334aee1 (diff)
Add preference setting for delete toot modal (#3368)
* Set delete_modal preference to true by default
* Does not show confirmation modal if delete_modal is false
* Add ja translation for preference setting page
Diffstat (limited to 'app/lib')
-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 6104773ad..af264bbd5 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -19,6 +19,7 @@ class UserSettingsDecorator
     user.settings['interactions'] = merged_interactions
     user.settings['default_privacy'] = default_privacy_preference
     user.settings['boost_modal'] = boost_modal_preference
+    user.settings['delete_modal'] = delete_modal_preference
     user.settings['auto_play_gif'] = auto_play_gif_preference
   end
 
@@ -38,6 +39,10 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_boost_modal'
   end
 
+  def delete_modal_preference
+    boolean_cast_setting 'setting_delete_modal'
+  end
+
   def auto_play_gif_preference
     boolean_cast_setting 'setting_auto_play_gif'
   end