about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/public_timeline/index.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-07-29 23:52:06 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-07-29 16:52:06 +0200
commit06c83527f5e4b7c8460f7d4a62322d2b8e805056 (patch)
tree4f78cae7f5954993299c84996eb314152d9a3abe /app/javascript/mastodon/features/public_timeline/index.js
parent0a3cc246acca9645d5d41a25d73f510ff67af6f6 (diff)
Do not scroll up when modal is opened (#8095)
Diffstat (limited to 'app/javascript/mastodon/features/public_timeline/index.js')
-rw-r--r--app/javascript/mastodon/features/public_timeline/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/public_timeline/index.js b/app/javascript/mastodon/features/public_timeline/index.js
index 2d5bb3baf..5f7ac5fc7 100644
--- a/app/javascript/mastodon/features/public_timeline/index.js
+++ b/app/javascript/mastodon/features/public_timeline/index.js
@@ -39,6 +39,7 @@ export default class PublicTimeline extends React.PureComponent {
 
   static propTypes = {
     dispatch: PropTypes.func.isRequired,
+    shouldUpdateScroll: PropTypes.func,
     intl: PropTypes.object.isRequired,
     columnId: PropTypes.string,
     multiColumn: PropTypes.bool,
@@ -107,7 +108,7 @@ export default class PublicTimeline extends React.PureComponent {
   }
 
   render () {
-    const { intl, columnId, hasUnread, multiColumn, onlyMedia } = this.props;
+    const { intl, shouldUpdateScroll, columnId, hasUnread, multiColumn, onlyMedia } = this.props;
     const pinned = !!columnId;
 
     return (
@@ -131,6 +132,7 @@ export default class PublicTimeline extends React.PureComponent {
           trackScroll={!pinned}
           scrollKey={`public_timeline-${columnId}`}
           emptyMessage={<FormattedMessage id='empty_column.public' defaultMessage='There is nothing here! Write something publicly, or manually follow users from other instances to fill it up' />}
+          shouldUpdateScroll={shouldUpdateScroll}
         />
       </Column>
     );