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
This commit is contained in:
		@@ -27,7 +27,6 @@ class Favourites extends ImmutablePureComponent {
 | 
			
		||||
 | 
			
		||||
  static propTypes = {
 | 
			
		||||
    dispatch: PropTypes.func.isRequired,
 | 
			
		||||
    shouldUpdateScroll: PropTypes.func,
 | 
			
		||||
    statusIds: ImmutablePropTypes.list.isRequired,
 | 
			
		||||
    intl: PropTypes.object.isRequired,
 | 
			
		||||
    columnId: PropTypes.string,
 | 
			
		||||
@@ -68,7 +67,7 @@ class Favourites extends ImmutablePureComponent {
 | 
			
		||||
  }, 300, { leading: true })
 | 
			
		||||
 | 
			
		||||
  render () {
 | 
			
		||||
    const { intl, shouldUpdateScroll, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
 | 
			
		||||
    const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
 | 
			
		||||
    const pinned = !!columnId;
 | 
			
		||||
 | 
			
		||||
    const emptyMessage = <FormattedMessage id='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 {
 | 
			
		||||
          hasMore={hasMore}
 | 
			
		||||
          isLoading={isLoading}
 | 
			
		||||
          onLoadMore={this.handleLoadMore}
 | 
			
		||||
          shouldUpdateScroll={shouldUpdateScroll}
 | 
			
		||||
          emptyMessage={emptyMessage}
 | 
			
		||||
          bindToDocument={!multiColumn}
 | 
			
		||||
        />
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user