diff options
author | ThibG <thib@sitedethib.com> | 2019-08-07 20:04:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 20:04:22 +0200 |
commit | 86cfa2ea6cb94c9597b9fcda034c8b4d959c5e3e (patch) | |
tree | 2e1b3be0201e53c96f05993f1295b0e97bb14166 /app/lib | |
parent | 8400ddca7155005ab79485ed6054c04ea3ca5667 (diff) | |
parent | e8ad0a800616a1f95fd71ab8457869e716212ca0 (diff) |
Merge pull request #1193 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/formatter.rb | 2 | ||||
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 |
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 |