mirror of https://github.com/Siphonay/mastodon
Bind click event to elefriend cycling. #294.
This commit is contained in:
parent
1dbb6b5e08
commit
cd1377de7f
|
@ -12,6 +12,7 @@ import {
|
||||||
showSearch,
|
showSearch,
|
||||||
submitSearch,
|
submitSearch,
|
||||||
} from 'flavours/glitch/actions/search';
|
} from 'flavours/glitch/actions/search';
|
||||||
|
import { cycleElefriendCompose } from 'flavours/glitch/actions/compose';
|
||||||
|
|
||||||
// Components.
|
// Components.
|
||||||
import Composer from 'flavours/glitch/features/composer';
|
import Composer from 'flavours/glitch/features/composer';
|
||||||
|
@ -39,6 +40,7 @@ const mapStateToProps = state => ({
|
||||||
const mapDispatchToProps = {
|
const mapDispatchToProps = {
|
||||||
onChange: changeSearch,
|
onChange: changeSearch,
|
||||||
onClear: clearSearch,
|
onClear: clearSearch,
|
||||||
|
onClickElefriend: cycleElefriendCompose,
|
||||||
onShow: showSearch,
|
onShow: showSearch,
|
||||||
onSubmit: submitSearch,
|
onSubmit: submitSearch,
|
||||||
onOpenSettings: openModal.bind(null, 'SETTINGS', {}),
|
onOpenSettings: openModal.bind(null, 'SETTINGS', {}),
|
||||||
|
@ -62,6 +64,7 @@ class Drawer extends React.Component {
|
||||||
multiColumn,
|
multiColumn,
|
||||||
onChange,
|
onChange,
|
||||||
onClear,
|
onClear,
|
||||||
|
onClickElefriend,
|
||||||
onOpenSettings,
|
onOpenSettings,
|
||||||
onShow,
|
onShow,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
|
@ -73,6 +76,7 @@ class Drawer extends React.Component {
|
||||||
|
|
||||||
let elefriendAttrs = {
|
let elefriendAttrs = {
|
||||||
className: classNames('mastodon', 'mbstobon-' + elefriend),
|
className: classNames('mastodon', 'mbstobon-' + elefriend),
|
||||||
|
onClick: onClickElefriend,
|
||||||
};
|
};
|
||||||
|
|
||||||
// The result.
|
// The result.
|
||||||
|
@ -128,6 +132,7 @@ Drawer.propTypes = {
|
||||||
// Dispatch props.
|
// Dispatch props.
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
onClear: PropTypes.func,
|
onClear: PropTypes.func,
|
||||||
|
onClickElefriend: PropTypes.func,
|
||||||
onShow: PropTypes.func,
|
onShow: PropTypes.func,
|
||||||
onSubmit: PropTypes.func,
|
onSubmit: PropTypes.func,
|
||||||
onOpenSettings: PropTypes.func,
|
onOpenSettings: PropTypes.func,
|
||||||
|
|
Loading…
Reference in New Issue