about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account_gallery
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-07-13 12:40:15 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-07-13 12:51:06 +0200
commit84fbe4d030e3176fffaf49ac8eec0c0602b1ba87 (patch)
tree1db54ddae0b3379d4a776820b831d75a9747cc83 /app/javascript/flavours/glitch/features/account_gallery
parent99f28c17dea35d0eec90a74c5fe95f60b6ad2f9e (diff)
Refactor shouldUpdateScroll stuff
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_gallery')
-rw-r--r--app/javascript/flavours/glitch/features/account_gallery/index.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js
index 83d623356..434a47dfc 100644
--- a/app/javascript/flavours/glitch/features/account_gallery/index.js
+++ b/app/javascript/flavours/glitch/features/account_gallery/index.js
@@ -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} />