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
constemptyMessage=<FormattedMessageid='empty_column.bookmarked_statuses'defaultMessage="You don't have any bookmarked toots yet. When you bookmark one, it will show up here."/>;
constemptyMessage=<FormattedMessageid='empty_column.bookmarked_statuses'defaultMessage="You don't have any bookmarked toots yet. When you bookmark one, it will show up here."/>;
@ -93,7 +92,6 @@ class Bookmarks extends ImmutablePureComponent {
@ -127,7 +126,6 @@ class CommunityTimeline extends React.PureComponent {
timelineId={`community${onlyMedia?':media':''}`}
timelineId={`community${onlyMedia?':media':''}`}
onLoadMore={this.handleLoadMore}
onLoadMore={this.handleLoadMore}
emptyMessage={<FormattedMessageid='empty_column.community'defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!'/>}
emptyMessage={<FormattedMessageid='empty_column.community'defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!'/>}
@ -93,7 +92,6 @@ class DirectTimeline extends React.PureComponent {
timelineId='direct'
timelineId='direct'
onLoadMore={this.handleLoadMore}
onLoadMore={this.handleLoadMore}
emptyMessage={<FormattedMessageid='empty_column.direct'defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here."/>}
emptyMessage={<FormattedMessageid='empty_column.direct'defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here."/>}
constemptyMessage=<FormattedMessageid='empty_column.favourited_statuses'defaultMessage="You don't have any favourite toots yet. When you favourite one, it will show up here."/>;
constemptyMessage=<FormattedMessageid='empty_column.favourited_statuses'defaultMessage="You don't have any favourite toots yet. When you favourite one, it will show up here."/>;
@ -93,7 +92,6 @@ class Favourites extends ImmutablePureComponent {
@ -154,7 +153,6 @@ class HomeTimeline extends React.PureComponent {
onLoadMore={this.handleLoadMore}
onLoadMore={this.handleLoadMore}
timelineId='home'
timelineId='home'
emptyMessage={<FormattedMessageid='empty_column.home'defaultMessage='Your home timeline is empty! Follow more people to fill it up. {suggestions}'values={{suggestions:<Linkto='/start'><FormattedMessageid='empty_column.home.suggestions'defaultMessage='See some suggestions'/></Link> }} />}
emptyMessage={<FormattedMessageid='empty_column.home'defaultMessage='Your home timeline is empty! Follow more people to fill it up. {suggestions}'values={{suggestions:<Linkto='/start'><FormattedMessageid='empty_column.home.suggestions'defaultMessage='See some suggestions'/></Link> }} />}
@ -207,7 +206,6 @@ class ListTimeline extends React.PureComponent {
timelineId={`list:${id}`}
timelineId={`list:${id}`}
onLoadMore={this.handleLoadMore}
onLoadMore={this.handleLoadMore}
emptyMessage={<FormattedMessageid='empty_column.list'defaultMessage='There is nothing in this list yet. When members of this list post new statuses, they will appear here.'/>}
emptyMessage={<FormattedMessageid='empty_column.list'defaultMessage='There is nothing in this list yet. When members of this list post new statuses, they will appear here.'/>}
constemptyMessage=<FormattedMessageid='empty_column.notifications'defaultMessage="You don't have any notifications yet. When other people interact with you, you will see it here."/>;
constemptyMessage=<FormattedMessageid='empty_column.notifications'defaultMessage="You don't have any notifications yet. When other people interact with you, you will see it here."/>;
@ -227,7 +226,6 @@ class Notifications extends React.PureComponent {
@ -130,7 +129,6 @@ class PublicTimeline extends React.PureComponent {
trackScroll={!pinned}
trackScroll={!pinned}
scrollKey={`public_timeline-${columnId}`}
scrollKey={`public_timeline-${columnId}`}
emptyMessage={<FormattedMessageid='empty_column.public'defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up'/>}
emptyMessage={<FormattedMessageid='empty_column.public'defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up'/>}