rename nop handler to handleNoOp

This also adds the comment in action_bar.js to
status_action_bar.js, clarifying that a future
version could improve this code by modifying
EmojiPickerDropdown.
This commit is contained in:
fef 2022-12-02 01:00:08 +00:00
parent 7187d6f9cf
commit 6aa7d7fb12
No known key found for this signature in database
GPG key ID: EC22E476DC2D3D84
4 changed files with 8 additions and 8 deletions

View file

@ -208,7 +208,7 @@ class StatusActionBar extends ImmutablePureComponent {
this.props.onAddFilter(this.props.status);
}
nop = () => {}
handleNoOp = () => {} // hack for reaction add button
render () {
const { status, intl, withDismiss, withCounters, showReplyCount, scrollKey } = this.props;
@ -315,7 +315,7 @@ class StatusActionBar extends ImmutablePureComponent {
const reactButton = (
<IconButton
className='status__action-bar-button'
onClick={this.nop} // EmojiPickerDropdown handles that
onClick={this.handleNoOp} // EmojiPickerDropdown handles that
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'

View file

@ -144,7 +144,7 @@ class ActionBar extends React.PureComponent {
navigator.clipboard.writeText(url);
}
nop = () => {} // hack for reaction add button
handleNoOp = () => {} // hack for reaction add button
render () {
const { status, intl } = this.props;
@ -207,7 +207,7 @@ class ActionBar extends React.PureComponent {
const reactButton = (
<IconButton
className='plus-icon'
onClick={this.nop} // EmojiPickerDropdown handles that
onClick={this.handleNoOp} // EmojiPickerDropdown handles that
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'

View file

@ -243,7 +243,7 @@ class StatusActionBar extends ImmutablePureComponent {
this.props.onFilter();
}
nop = () => {}
handleNoOp = () => {} // hack for reaction add button
render () {
const { status, relationship, intl, withDismiss, withCounters, scrollKey } = this.props;
@ -368,7 +368,7 @@ class StatusActionBar extends ImmutablePureComponent {
const reactButton = (
<IconButton
className='status__action-bar-button'
onClick={this.nop} // EmojiPickerDropdown handles that
onClick={this.handleNoOp} // EmojiPickerDropdown handles that
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'

View file

@ -186,7 +186,7 @@ class ActionBar extends React.PureComponent {
navigator.clipboard.writeText(url);
}
nop = () => {} // hack for reaction add button
handleNoOp = () => {} // hack for reaction add button
render () {
const { status, relationship, intl } = this.props;
@ -263,7 +263,7 @@ class ActionBar extends React.PureComponent {
const reactButton = (
<IconButton
className='plus-icon'
onClick={this.nop} // EmojiPickerDropdown handles that
onClick={this.handleNoOp} // EmojiPickerDropdown handles that
title={intl.formatMessage(messages.react)}
disabled={!canReact}
icon='plus'