about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-06-06 00:10:40 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-05 17:10:40 +0200
commit61fcdbbf7e2df3ad409857af682d2699fafa1928 (patch)
tree2e457894b5fe96df3b63f93defae5af08e1d024f /app
parent43af695ba149ee51aee84d14071c6e3970b68e87 (diff)
Add back button to hashtag timeline again (#3587)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/components/column_header.js5
-rw-r--r--app/javascript/mastodon/features/hashtag_timeline/index.js1
2 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js
index e6349a399..7a9dba723 100644
--- a/app/javascript/mastodon/components/column_header.js
+++ b/app/javascript/mastodon/components/column_header.js
@@ -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,
@@ -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', {
@@ -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' />
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.js b/app/javascript/mastodon/features/hashtag_timeline/index.js
index da43e9403..f79b27c63 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/index.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.js
@@ -117,6 +117,7 @@ class HashtagTimeline extends React.PureComponent {
           onClick={this.handleHeaderClick}
           pinned={pinned}
           multiColumn={multiColumn}
+          showBackButton={true}
         />
 
         <StatusListContainer