[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:
committed by
Thibaut Girka
parent
fdadd520b1
commit
90bdbddbfe
@@ -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}>
|
||||
|
Reference in New Issue
Block a user