From f812bda850469c5a9890a23b31aca0b7caaec91a Mon Sep 17 00:00:00 2001 From: KMY Date: Mon, 27 Feb 2023 17:31:45 +0900 Subject: [PATCH] Remove emoji reactions view by notification --- app/javascript/mastodon/components/status.jsx | 3 ++- .../features/notifications/components/notification.jsx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index c3feb7efdb..3d920bdb79 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -106,6 +106,7 @@ class Status extends ImmutablePureComponent { inUse: PropTypes.bool, available: PropTypes.bool, }), + withoutEmojiReactions: PropTypes.bool, }; // Avoid checking props that are functions (and whose equality will always @@ -509,7 +510,7 @@ class Status extends ImmutablePureComponent { const visibilityIcon = visibilityIconInfo[status.get('visibility')]; let emojiReactionsBar = null; - if (status.get('emoji_reactions')) { + if (!this.props.withoutEmojiReactions && status.get('emoji_reactions')) { const emojiReactions = status.get('emoji_reactions'); emojiReactionsBar = ; } diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index ba686d45a7..b328155f82 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -179,6 +179,7 @@ class Notification extends ImmutablePureComponent { cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} unread={this.props.unread} + withoutEmojiReactions={true} /> ); } @@ -209,6 +210,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} /> @@ -216,7 +218,6 @@ class Notification extends ImmutablePureComponent { } renderEmojiReaction (notification, link) { - console.dir(notification) const { intl, unread } = this.props; const emoji_reaction = notification.get('emoji_reaction'); @@ -243,6 +244,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} /> @@ -275,6 +277,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} /> @@ -312,6 +315,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} /> @@ -349,6 +353,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} /> @@ -392,6 +397,7 @@ class Notification extends ImmutablePureComponent { updateScrollBottom={this.props.updateScrollBottom} cachedMediaWidth={this.props.cachedMediaWidth} cacheMediaWidth={this.props.cacheMediaWidth} + withoutEmojiReactions={true} />