mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 03:28:06 +01:00
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:
parent
a9bb743db7
commit
a2db70b3c8
4 changed files with 8 additions and 8 deletions
|
@ -208,7 +208,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;
|
||||||
|
@ -317,7 +317,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'
|
||||||
|
|
|
@ -144,7 +144,7 @@ class ActionBar extends React.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;
|
||||||
|
@ -207,7 +207,7 @@ class ActionBar extends React.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'
|
||||||
|
|
|
@ -243,7 +243,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;
|
||||||
|
@ -369,7 +369,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'
|
||||||
|
|
|
@ -186,7 +186,7 @@ class ActionBar extends React.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;
|
||||||
|
@ -263,7 +263,7 @@ class ActionBar extends React.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'
|
||||||
|
|
Loading…
Reference in a new issue