about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/direct_timeline/index.js
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-05-04 12:00:22 -0500
committerStarfall <us@starfall.systems>2022-05-04 12:00:22 -0500
commite9b2e11520056d0ec822ac0862923d00c6a1289c (patch)
tree53b22a4fecda9846fc6c77cf4067c071a6287df0 /app/javascript/flavours/glitch/features/direct_timeline/index.js
parent9ec0ecda66745c892961a917b18354f42dfc1f19 (diff)
parent58ac5ae643dc57ffd20017c54e7be523deaef156 (diff)
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/javascript/flavours/glitch/features/direct_timeline/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/direct_timeline/index.js32
1 files changed, 2 insertions, 30 deletions
diff --git a/app/javascript/flavours/glitch/features/direct_timeline/index.js b/app/javascript/flavours/glitch/features/direct_timeline/index.js
index 7741c6922..75ca19d17 100644
--- a/app/javascript/flavours/glitch/features/direct_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/direct_timeline/index.js
@@ -10,7 +10,6 @@ import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/col
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import ColumnSettingsContainer from './containers/column_settings_container';
 import { connectDirectStream } from 'flavours/glitch/actions/streaming';
-import { changeSetting } from 'flavours/glitch/actions/settings';
 import ConversationsListContainer from './containers/conversations_list_container';
 
 const messages = defineMessages({
@@ -99,14 +98,6 @@ class DirectTimeline extends React.PureComponent {
     this.props.dispatch(expandConversations({ maxId }));
   }
 
-  handleTimelineClick = () => {
-    this.props.dispatch(changeSetting(['direct', 'conversations'], false));
-  }
-
-  handleConversationsClick = () => {
-    this.props.dispatch(changeSetting(['direct', 'conversations'], true));
-  }
-
   render () {
     const { intl, hasUnread, columnId, multiColumn, conversationsMode } = this.props;
     const pinned = !!columnId;
@@ -119,6 +110,7 @@ class DirectTimeline extends React.PureComponent {
           scrollKey={`direct_timeline-${columnId}`}
           timelineId='direct'
           onLoadMore={this.handleLoadMore}
+          prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
           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." />}
         />
       );
@@ -129,6 +121,7 @@ class DirectTimeline extends React.PureComponent {
           scrollKey={`direct_timeline-${columnId}`}
           timelineId='direct'
           onLoadMore={this.handleLoadMoreTimeline}
+          prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
           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." />}
         />
       );
@@ -149,27 +142,6 @@ class DirectTimeline extends React.PureComponent {
           <ColumnSettingsContainer />
         </ColumnHeader>
 
-        <div className='notification__filter-bar'>
-          <button
-            className={conversationsMode ? 'active' : ''}
-            onClick={this.handleConversationsClick}
-          >
-            <FormattedMessage
-              id='direct.conversations_mode'
-              defaultMessage='Conversations'
-            />
-          </button>
-          <button
-            className={conversationsMode ? '' : 'active'}
-            onClick={this.handleTimelineClick}
-          >
-            <FormattedMessage
-              id='direct.timeline_mode'
-              defaultMessage='Timeline'
-            />
-          </button>
-        </div>
-
         {contents}
       </Column>
     );