Refactor shouldUpdateScroll stuff
This commit is contained in:
@@ -11,7 +11,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { getAccountGallery } from 'flavours/glitch/selectors';
|
||||
import MediaItem from './components/media_item';
|
||||
import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';
|
||||
import { ScrollContainer } from 'react-router-scroll-4';
|
||||
import ScrollContainer from 'flavours/glitch/containers/scroll_container';
|
||||
import LoadMore from 'flavours/glitch/components/load_more';
|
||||
import MissingIndicator from 'flavours/glitch/components/missing_indicator';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
@@ -104,10 +104,6 @@ class AccountGallery extends ImmutablePureComponent {
|
||||
this.handleScrollToBottom();
|
||||
}
|
||||
|
||||
shouldUpdateScroll = (prevRouterProps, { location }) => {
|
||||
return !(prevRouterProps?.location?.state?.mastodonModalKey || location.state?.mastodonModalKey);
|
||||
}
|
||||
|
||||
setColumnRef = c => {
|
||||
this.column = c;
|
||||
}
|
||||
@@ -164,7 +160,7 @@ class AccountGallery extends ImmutablePureComponent {
|
||||
<Column ref={this.setColumnRef}>
|
||||
<ProfileColumnHeader onClick={this.handleHeaderClick} multiColumn={multiColumn} />
|
||||
|
||||
<ScrollContainer scrollKey='account_gallery' shouldUpdateScroll={this.shouldUpdateScroll}>
|
||||
<ScrollContainer scrollKey='account_gallery'>
|
||||
<div className='scrollable scrollable--flex' onScroll={this.handleScroll}>
|
||||
<HeaderContainer accountId={this.props.params.accountId} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user