From f21e7d6ac06556671c2663ce2879442c60230b32 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 30 Jan 2017 21:40:55 +0100 Subject: Make profile header scroll along with contents. AccountTimeline, Followers and Following are no longer nested inside a common parent (), instead they all embed --- .../components/features/status/components/action_bar.jsx | 6 +++++- app/assets/javascripts/components/features/status/index.jsx | 8 ++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app/assets/javascripts/components/features/status') diff --git a/app/assets/javascripts/components/features/status/components/action_bar.jsx b/app/assets/javascripts/components/features/status/components/action_bar.jsx index 3f8a0457d..2f152e919 100644 --- a/app/assets/javascripts/components/features/status/components/action_bar.jsx +++ b/app/assets/javascripts/components/features/status/components/action_bar.jsx @@ -14,6 +14,10 @@ const messages = defineMessages({ const ActionBar = React.createClass({ + contextTypes: { + router: React.PropTypes.object + }, + propTypes: { status: ImmutablePropTypes.map.isRequired, onReply: React.PropTypes.func.isRequired, @@ -43,7 +47,7 @@ const ActionBar = React.createClass({ }, handleMentionClick () { - this.props.onMention(this.props.status.get('account')); + this.props.onMention(this.props.status.get('account'), this.context.router); }, render () { diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx index 389549849..993c649d2 100644 --- a/app/assets/javascripts/components/features/status/index.jsx +++ b/app/assets/javascripts/components/features/status/index.jsx @@ -80,12 +80,8 @@ const Status = React.createClass({ this.props.dispatch(deleteStatus(status.get('id'))); }, - handleMentionClick (account) { - this.props.dispatch(mentionCompose(account)); - - if (isMobile(window.innerWidth)) { - this.context.router.push('/statuses/new'); - } + handleMentionClick (account, router) { + this.props.dispatch(mentionCompose(account, router)); }, handleOpenMedia (url) { -- cgit