diff options
author | ThibG <thib@sitedethib.com> | 2020-07-09 15:09:19 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-07-10 17:05:44 +0200 |
commit | e248399220617efe3c0832e9538ef2fe3e35b35e (patch) | |
tree | e9f540655285872899c2c75714123513c5f3cc3d /app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js | |
parent | 042c32ea3bcb4f5986dcb6b39a25a8cead3bf86a (diff) |
[Glitch] Freeze scroll position when a dropdown menu is open in the TL
Port 6fda3cbbebfdc7b050f4437b996b2ad36c1db64c to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js b/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js index 4fa76fd6d..c2aff1b57 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js @@ -10,6 +10,7 @@ export default class ConversationsList extends ImmutablePureComponent { static propTypes = { conversations: ImmutablePropTypes.list.isRequired, + scrollKey: PropTypes.string.isRequired, hasMore: PropTypes.bool, isLoading: PropTypes.bool, onLoadMore: PropTypes.func, @@ -57,13 +58,14 @@ export default class ConversationsList extends ImmutablePureComponent { const { conversations, onLoadMore, ...other } = this.props; return ( - <ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} scrollKey='direct' ref={this.setRef}> + <ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}> {conversations.map(item => ( <ConversationContainer key={item.get('id')} conversationId={item.get('id')} onMoveUp={this.handleMoveUp} onMoveDown={this.handleMoveDown} + scrollKey={this.props.scrollKey} /> ))} </ScrollableList> |