1
0

fix build, take 5

This commit is contained in:
Noa Himesaka 2023-11-11 23:46:44 +09:00
parent ecec59ea45
commit 960b21edc1
4 changed files with 0 additions and 56 deletions

View File

@ -385,17 +385,6 @@ class StatusActionBar extends ImmutablePureComponent {
<IconButton className='status__action-bar__button' title={intl.formatMessage(messages.hide)} icon='eye' iconComponent={VisibilityIcon} onClick={this.handleHideClick} />
);
const canReact = signedIn && status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
const reactButton = (
<IconButton
className='status__action-bar-button'
onClick={this.handleNoOp} // EmojiPickerDropdown handles that
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'
/>
);
const isReply = status.get('in_reply_to_account_id') === status.getIn(['account', 'id']);
const canReact = signedIn && status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
const reactButton = (

View File

@ -201,11 +201,7 @@ class ActionBar extends PureComponent {
navigator.clipboard.writeText(url);
};
<<<<<<< HEAD
handleNoOp = () => {} // hack for reaction add button
=======
handleNoOp = () => {}; // hack for reaction add button
>>>>>>> pr2462
render () {
const { status, relationship, intl } = this.props;
@ -300,10 +296,7 @@ class ActionBar extends PureComponent {
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'
<<<<<<< HEAD
=======
iconComponent={AddIcon}
>>>>>>> pr2462
/>
);

View File

@ -73,7 +73,6 @@ const initialState = ImmutableMap({
favourite: true,
reaction: true,
reblog: true,
reaction: true,
mention: true,
poll: true,
status: true,

View File

@ -105,43 +105,6 @@ const statusTranslateUndo = (state, id) => {
});
};
const updateReaction = (state, id, name, updater) => state.update(
id,
status => status.update(
'reactions',
reactions => {
const index = reactions.findIndex(reaction => reaction.get('name') === name);
if (index > -1) {
return reactions.update(index, reaction => updater(reaction));
} else {
return reactions.push(updater(fromJS({ name, count: 0 })));
}
},
),
);
const updateReactionCount = (state, reaction) => updateReaction(state, reaction.status_id, reaction.name, x => x.set('count', reaction.count));
// The url parameter is only used when adding a new custom emoji reaction
// (one that wasn't in the reactions list before) because we don't have its
// URL yet. In all other cases, it's undefined.
const addReaction = (state, id, name, url) => updateReaction(
state,
id,
name,
x => x.set('me', true)
.update('count', n => n + 1)
.update('url', old => old ? old : url)
.update('static_url', old => old ? old : url),
);
const removeReaction = (state, id, name) => updateReaction(
state,
id,
name,
x => x.set('me', false).update('count', n => n - 1),
);
const initialState = ImmutableMap();
export default function statuses(state = initialState, action) {