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:
		@@ -24,7 +24,6 @@ class PinnedStatuses extends ImmutablePureComponent {
 | 
			
		||||
 | 
			
		||||
  static propTypes = {
 | 
			
		||||
    dispatch: PropTypes.func.isRequired,
 | 
			
		||||
    shouldUpdateScroll: PropTypes.func,
 | 
			
		||||
    statusIds: ImmutablePropTypes.list.isRequired,
 | 
			
		||||
    intl: PropTypes.object.isRequired,
 | 
			
		||||
    hasMore: PropTypes.bool.isRequired,
 | 
			
		||||
@@ -44,7 +43,7 @@ class PinnedStatuses extends ImmutablePureComponent {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render () {
 | 
			
		||||
    const { intl, shouldUpdateScroll, statusIds, hasMore, multiColumn } = this.props;
 | 
			
		||||
    const { intl, statusIds, hasMore, multiColumn } = this.props;
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
      <Column bindToDocument={!multiColumn} icon='thumb-tack' heading={intl.formatMessage(messages.heading)} ref={this.setRef}>
 | 
			
		||||
@@ -53,7 +52,6 @@ class PinnedStatuses extends ImmutablePureComponent {
 | 
			
		||||
          statusIds={statusIds}
 | 
			
		||||
          scrollKey='pinned_statuses'
 | 
			
		||||
          hasMore={hasMore}
 | 
			
		||||
          shouldUpdateScroll={shouldUpdateScroll}
 | 
			
		||||
          bindToDocument={!multiColumn}
 | 
			
		||||
        />
 | 
			
		||||
      </Column>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user