]> cat aescling's git repositories - mastodon.git/commitdiff
Fixed error occurrence when pinning the DM column. (#8922)
authormayaeh <mayaeh@marimo-net.org>
Mon, 8 Oct 2018 12:43:38 +0000 (21:43 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 8 Oct 2018 12:43:38 +0000 (14:43 +0200)
app/javascript/mastodon/features/direct_timeline/index.js

index 4c84856904e344f86b525b7c3773e9e32227d0a8..41ec73d98fe66427f129ecf20d0439bc9a00fd47 100644 (file)
@@ -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';
 
@@ -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>
     );
   }