Skip to content

Commit

Permalink
Add back button to hashtag timeline again (#3587)
Browse files Browse the repository at this point in the history
  • Loading branch information
unarist authored and Gargron committed Jun 5, 2017
1 parent 43af695 commit 61fcdbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/javascript/mastodon/components/column_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ColumnHeader extends React.PureComponent {
icon: PropTypes.string.isRequired,
active: PropTypes.bool,
multiColumn: PropTypes.bool,
showBackButton: PropTypes.bool,
children: PropTypes.node,
pinned: PropTypes.bool,
onPin: PropTypes.func,
Expand Down Expand Up @@ -53,7 +54,7 @@ class ColumnHeader extends React.PureComponent {
}

render () {
const { title, icon, active, children, pinned, onPin, multiColumn } = this.props;
const { title, icon, active, children, pinned, onPin, multiColumn, showBackButton } = this.props;
const { collapsed, animating } = this.state;

const buttonClassName = classNames('column-header', {
Expand Down Expand Up @@ -90,7 +91,9 @@ class ColumnHeader extends React.PureComponent {
);
} else if (multiColumn) {
pinButton = <button key='pin-button' className='text-btn column-header__setting-btn' onClick={onPin}><i className='fa fa fa-plus' /> <FormattedMessage id='column_header.pin' defaultMessage='Pin' /></button>;
}

if (!pinned && (multiColumn || showBackButton)) {
backButton = (
<button onClick={this.handleBackClick} className='column-header__back-button'>
<i className='fa fa-fw fa-chevron-left column-back-button__icon' />
Expand Down
1 change: 1 addition & 0 deletions app/javascript/mastodon/features/hashtag_timeline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class HashtagTimeline extends React.PureComponent {
onClick={this.handleHeaderClick}
pinned={pinned}
multiColumn={multiColumn}
showBackButton={true}
/>

<StatusListContainer
Expand Down

0 comments on commit 61fcdbb

Please sign in to comment.