Skip to content

Commit

Permalink
Fixed error occurrence when pinning the DM column. (mastodon#8922)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayaeh authored and Gargron committed Oct 8, 2018
1 parent 4c4ff05 commit 770e337
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/javascript/mastodon/features/direct_timeline/index.js
Expand Up @@ -5,7 +5,7 @@ import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import { expandConversations } from '../../actions/conversations';
import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
import { defineMessages, injectIntl } from 'react-intl';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connectDirectStream } from '../../actions/streaming';
import ConversationsListContainer from './containers/conversations_list_container';

Expand Down Expand Up @@ -84,7 +84,14 @@ class DirectTimeline extends React.PureComponent {
multiColumn={multiColumn}
/>

<ConversationsListContainer shouldUpdateScroll={shouldUpdateScroll} />
<ConversationsListContainer
trackScroll={!pinned}
scrollKey={`direct_timeline-${columnId}`}
timelineId='direct'
onLoadMore={this.handleLoadMore}
emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here." />}
shouldUpdateScroll={shouldUpdateScroll}
/>
</Column>
);
}
Expand Down

0 comments on commit 770e337

Please sign in to comment.