[Glitch] Fix scroll to top in single column UI

Port 2dee293c4c to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
Eugen Rochko
2019-08-01 19:17:17 +02:00
committed by Thibaut Girka
parent fdadd520b1
commit 90bdbddbfe
27 changed files with 57 additions and 25 deletions

View File

@@ -55,6 +55,7 @@ class AccountGallery extends ImmutablePureComponent {
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
isAccount: PropTypes.bool,
multiColumn: PropTypes.bool,
};
state = {
@@ -130,7 +131,7 @@ class AccountGallery extends ImmutablePureComponent {
}
render () {
const { attachments, isLoading, hasMore, isAccount } = this.props;
const { attachments, isLoading, hasMore, isAccount, multiColumn } = this.props;
const { width } = this.state;
if (!isAccount) {
@@ -157,7 +158,7 @@ class AccountGallery extends ImmutablePureComponent {
return (
<Column ref={this.setColumnRef}>
<ProfileColumnHeader onClick={this.handleHeaderClick} />
<ProfileColumnHeader onClick={this.handleHeaderClick} multiColumn={multiColumn} />
<ScrollContainer scrollKey='account_gallery' shouldUpdateScroll={this.shouldUpdateScroll}>
<div className='scrollable scrollable--flex' onScroll={this.handleScroll}>