diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-06-10 22:25:36 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-06-11 00:08:41 +0200 |
commit | 15929a3d597cc8f50091e602be5277ab00574286 (patch) | |
tree | e009a465c83a984f0e69776ee3aa0d27401f6e98 /app/helpers/application_helper.rb | |
parent | 970f06331bc7e482226e974c468b559a9e2f3fa3 (diff) | |
parent | f09a66b9a741515532a1bfa0f2c3af08d9cc84b6 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Our README is completely different. Discarded upstream changes. - `app/javascript/packs/mailer.js`: We had removed the file. Move the changes to `app/javascript/core/mailer.js`.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a4023733c..62739b964 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -99,11 +99,6 @@ module ApplicationHelper end end - def favicon_path - env_suffix = Rails.env.production? ? '' : '-dev' - "/favicon#{env_suffix}.ico" - end - def title Rails.env.production? ? site_title : "#{site_title} (Dev)" end @@ -147,8 +142,8 @@ module ApplicationHelper end end - def custom_emoji_tag(custom_emoji, animate = true) - if animate + def custom_emoji_tag(custom_emoji) + if prefers_autoplay? image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:") else image_tag(custom_emoji.image.url(:static), class: 'emojione custom-emoji', alt: ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static))) @@ -199,7 +194,7 @@ module ApplicationHelper def quote_wrap(text, line_width: 80, break_sequence: "\n") text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence) - text.split("\n").map { |line| '> ' + line }.join("\n") + text.split("\n").map { |line| "> #{line}" }.join("\n") end def render_initial_state |