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 committed by Jeremy Kescher
parent ef97a35161
commit a05d93da6d
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4
4 changed files with 8 additions and 8 deletions

View file

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

View file

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

View file

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

View file

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