From 59e8b9faa58cd2e6b450b6a10cad44c92dee855a Mon Sep 17 00:00:00 2001 From: Essem Date: Mon, 18 Dec 2023 18:27:02 -0600 Subject: [PATCH] Linting fixes --- .../flavours/glitch/components/status_reactions.jsx | 6 +++--- app/models/status.rb | 2 ++ app/views/settings/preferences/appearance/show.html.haml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status_reactions.jsx b/app/javascript/flavours/glitch/components/status_reactions.jsx index e3ae79958b..81443d2055 100644 --- a/app/javascript/flavours/glitch/components/status_reactions.jsx +++ b/app/javascript/flavours/glitch/components/status_reactions.jsx @@ -96,11 +96,11 @@ class Reaction extends ImmutablePureComponent { } else { addReaction(statusId, reaction.get('name')); } - } + }; - handleMouseEnter = () => this.setState({ hovered: true }) + handleMouseEnter = () => this.setState({ hovered: true }); - handleMouseLeave = () => this.setState({ hovered: false }) + handleMouseLeave = () => this.setState({ hovered: false }); render() { const { reaction } = this.props; diff --git a/app/models/status.rb b/app/models/status.rb index fd90547851..0e902472e3 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -283,7 +283,9 @@ class Status < ApplicationRecord if account.nil? scope.select('name, custom_emoji_id, count(*) as count, false as me') else + # rubocop:disable Layout/LineLength scope.select("name, custom_emoji_id, count(*) as count, exists(select 1 from status_reactions r where r.account_id = #{account.id} and r.status_id = status_reactions.status_id and r.name = status_reactions.name and (r.custom_emoji_id = status_reactions.custom_emoji_id or r.custom_emoji_id is null and status_reactions.custom_emoji_id is null)) as me") + # rubocop:enable Layout/LineLength end end diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index cf608095e7..8b7b9edcc0 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -37,7 +37,7 @@ = ff.input :'web.use_system_emoji_font', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_system_emoji_font'), glitch_only: true .fields-group.fields-row__column.fields-row__column-6 - = ff.input :'visible_reactions', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_visible_reactions'), input_html: { type: 'number', min: '0', data: { default: '6' } }, hint: false + = ff.input :visible_reactions, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_visible_reactions'), input_html: { type: 'number', min: '0', data: { default: '6' } }, hint: false %h4= t 'appearance.discovery'