diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-07-13 15:45:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 15:45:17 +0200 |
commit | d3791cca0cd862baca19ea6c7e23ce71ac5744f6 (patch) | |
tree | fdcc322863442095e8e3a7342037f96862beb7ce /app/javascript/mastodon/features/status | |
parent | a2ce7508c95f473a77d46a99fc1e090c0defadcc (diff) |
Improve modal flow and back button handling (#16499)
* Refactor shouldUpdateScroll passing So far, shouldUpdateScroll has been manually passed down from the very top of the React component hierarchy even though it is a static function common to all ScrollContainer instances, so replaced that with a custom class extending ScrollContainer. * Generalize “press back to close modal” to any modal and to public pages * Fix boost confirmation modal closing media modal
Diffstat (limited to 'app/javascript/mastodon/features/status')
-rw-r--r-- | app/javascript/mastodon/features/status/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index df8362a1b..69cd245fb 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -45,7 +45,7 @@ import { initBlockModal } from '../../actions/blocks'; import { initBoostModal } from '../../actions/boosts'; import { initReport } from '../../actions/reports'; import { makeGetStatus, makeGetPictureInPicture } from '../../selectors'; -import { ScrollContainer } from 'react-router-scroll-4'; +import ScrollContainer from 'mastodon/containers/scroll_container'; import ColumnBackButton from '../../components/column_back_button'; import ColumnHeader from '../../components/column_header'; import StatusContainer from '../../containers/status_container'; @@ -498,7 +498,7 @@ class Status extends ImmutablePureComponent { render () { let ancestors, descendants; - const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, pictureInPicture } = this.props; + const { status, ancestorsIds, descendantsIds, intl, domain, multiColumn, pictureInPicture } = this.props; const { fullscreen } = this.state; if (status === null) { @@ -541,7 +541,7 @@ class Status extends ImmutablePureComponent { )} /> - <ScrollContainer scrollKey='thread' shouldUpdateScroll={shouldUpdateScroll}> + <ScrollContainer scrollKey='thread'> <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}> {ancestors} |