Skip to content

Commit

Permalink
Merge pull request #859 from kmycode/kbtopic-fix-emoji-reaction-button
Browse files Browse the repository at this point in the history
Fix upstream-20241001
  • Loading branch information
kmycode authored Oct 1, 2024
2 parents 429469b + 4182f75 commit 007ed79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 5 additions & 1 deletion app/javascript/mastodon/actions/notification_groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function dispatchAssociatedRecords(
dispatch(importFetchedStatuses(fetchedStatuses));
}

const supportedGroupedNotificationTypes = ['favourite', 'reblog'];
const supportedGroupedNotificationTypes = [
'favourite',
'reblog',
'emoji_reaction',
];

export const fetchNotifications = createDataLoadingThunk(
'notificationGroups/fetch',
Expand Down
10 changes: 6 additions & 4 deletions app/javascript/mastodon/components/status_action_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,13 @@ class StatusActionBar extends ImmutablePureComponent {
const outside = emojiReactionPolicy !== 'outside_only' || (relationship && (relationship.get('following') || relationship.get('followed_by')));
const denyFromAll = emojiReactionPolicy !== 'block' && emojiReactionPolicy !== 'block';
const emojiPickerDropdown = (enableEmojiReaction && emojiReactionAvailableServer && denyFromAll && (writtenByMe || (following && followed && mutual && outside)) && (
<EmojiPickerDropdown onPickEmoji={this.handleEmojiPick} button={(
<IconButton className='status__action-bar__button' icon='smile-o' iconComponent={EmojiReactionIcon} onClick={this.handleEmojiPickInnerButton} />
)} />
<div className='status__action-bar__button-wrapper'>
<EmojiPickerDropdown onPickEmoji={this.handleEmojiPick} button={(
<IconButton icon='smile-o' iconComponent={EmojiReactionIcon} onClick={this.handleEmojiPickInnerButton} />
)} />
</div>
)) || (enableEmojiReaction && (
<div className='status__action-bar__button__blank' />
<div className='status__action-bar__button-wrapper status__action-bar__button-wrapper__blank' />
)) || null;

const isReply = status.get('in_reply_to_account_id') === status.getIn(['account', 'id']);
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,10 @@ body > [data-popper-placement] {
&:last-child {
flex-grow: 0;
}

&__blank {
width: 24px;
}
}

&--first-in-thread {
Expand Down Expand Up @@ -1767,10 +1771,6 @@ body > [data-popper-placement] {
align-items: center;
gap: 18px;
margin-top: 16px;

&__button__blank {
width: 24px;
}
}

.detailed-status__action-bar-dropdown {
Expand Down

0 comments on commit 007ed79

Please sign in to comment.