about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-08-07 13:56:48 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-07 13:56:48 +0200
commit04534604c654060eca24628247fdb51b7ff5372a (patch)
treef8ae222e84056fb2674d23187e66517da1fc2af9 /app/lib
parent8400ddca7155005ab79485ed6054c04ea3ca5667 (diff)
parentac33f1aedd9a6c72c6c176afb1f5d62a1ce5d44d (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/user.rb
- app/serializers/initial_state_serializer.rb
- app/views/admin/dashboard/index.html.haml
- config/locales/simple_form.en.yml
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/formatter.rb2
-rw-r--r--app/lib/user_settings_decorator.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index c9f78cd31..d85a333b3 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -380,7 +380,7 @@ class Formatter
   end
 
   def hashtag_html(tag)
-    "<a href=\"#{encode(tag_url(tag.downcase))}\" class=\"mention hashtag\" rel=\"tag\">#<span>#{encode(tag)}</span></a>"
+    "<a href=\"#{encode(tag_url(tag))}\" class=\"mention hashtag\" rel=\"tag\">#<span>#{encode(tag)}</span></a>"
   end
 
   def mention_html(account)
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb
index 51d8c0970..a52172707 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -40,6 +40,7 @@ class UserSettingsDecorator
     user.settings['default_content_type']= default_content_type_preference if change?('setting_default_content_type')
     user.settings['use_blurhash']        = use_blurhash_preference if change?('setting_use_blurhash')
     user.settings['use_pending_items']   = use_pending_items_preference if change?('setting_use_pending_items')
+    user.settings['trends']              = trends_preference if change?('setting_trends')
   end
 
   def merged_notification_emails
@@ -142,6 +143,10 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_use_pending_items'
   end
 
+  def trends_preference
+    boolean_cast_setting 'setting_trends'
+  end
+
   def boolean_cast_setting(key)
     ActiveModel::Type::Boolean.new.cast(settings[key])
   end