about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/status
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-19 18:20:19 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-19 18:20:19 +0200
commit04bbc576906ff70feed7d42fef0e6db17fdd9ed3 (patch)
tree789e41ff1abc26044dd230ca05b0aa517e98c453 /app/assets/javascripts/components/features/status
parent8698cd3281ac1d699c723a151b14f1e2f2e8b07e (diff)
Fix #100 - Add "back" button to certain views
Also fix reloading of timelines after merge-type events
Diffstat (limited to 'app/assets/javascripts/components/features/status')
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx18
1 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index cc7a2bfeb..c51fb5d31 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -16,6 +16,8 @@ import {
   getStatusAncestors,
   getStatusDescendants
 }                            from '../../selectors';
+import { ScrollContainer }   from 'react-router-scroll';
+import ColumnBackButton      from '../../components/column_back_button';
 
 const mapStateToProps = (state, props) => ({
   status: getStatus(state, Number(props.params.statusId)),
@@ -81,14 +83,18 @@ const Status = React.createClass({
 
     return (
       <Column>
-        <div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
-          <div>{this.renderChildren(ancestors)}</div>
+        <ColumnBackButton />
 
-          <DetailedStatus status={status} me={me} />
-          <ActionBar status={status} me={me} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} />
+        <ScrollContainer scrollKey='thread'>
+          <div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
+            <div>{this.renderChildren(ancestors)}</div>
 
-          <div>{this.renderChildren(descendants)}</div>
-        </div>
+            <DetailedStatus status={status} me={me} />
+            <ActionBar status={status} me={me} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} onDelete={this.handleDeleteClick} />
+
+            <div>{this.renderChildren(descendants)}</div>
+          </div>
+        </ScrollContainer>
       </Column>
     );
   }