From 8757ac7deb4e33d98e689ee5f1ea8ff0024afae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Wed, 3 Jan 2024 22:10:13 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20#396=20=E3=82=B9=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=81=AE=E6=95=B0=E5=AD=97=E3=82=92=E9=9A=A0=E3=81=97?= =?UTF-8?q?=E3=81=A6=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=20(#412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/components/status_emoji_reactions_bar.jsx | 10 ++++++++-- app/javascript/mastodon/initial_state.js | 1 + app/models/concerns/user/has_settings.rb | 4 ++++ app/models/user_settings.rb | 1 + app/serializers/initial_state_serializer.rb | 1 + .../settings/preferences/appearance/show.html.haml | 1 + config/locales/simple_form.en.yml | 1 + config/locales/simple_form.ja.yml | 1 + 8 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx b/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx index 5592c04f4c..84fb45f4f7 100644 --- a/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx +++ b/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx @@ -7,6 +7,8 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import { isHideItem } from 'mastodon/initial_state'; + import EmojiView from './emoji_view'; class EmojiReactionButton extends PureComponent { @@ -41,12 +43,14 @@ class EmojiReactionButton extends PureComponent { 'toggled': me, }; + const countView = count !== undefined && {count}; + return ( ); } @@ -76,6 +80,8 @@ class StatusEmojiReactionsBar extends PureComponent { render () { const { emojiReactions, myReactionOnly } = this.props; + const isShowCount = !isHideItem('emoji_reaction_count'); + const emojiButtons = Array.from(emojiReactions) .filter(emoji => emoji.get('count') !== 0) .filter(emoji => !myReactionOnly || emoji.get('me')) @@ -83,7 +89,7 @@ class StatusEmojiReactionsBar extends PureComponent {