+
@@ -281,7 +292,7 @@ class Status extends ImmutablePureComponent {
{statusAvatar}
-
+
diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversation.js b/app/javascript/mastodon/features/direct_timeline/components/conversation.js
index 52e33c3c85..7277b7f0fc 100644
--- a/app/javascript/mastodon/features/direct_timeline/components/conversation.js
+++ b/app/javascript/mastodon/features/direct_timeline/components/conversation.js
@@ -2,13 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import StatusContent from '../../../components/status_content';
-import RelativeTimestamp from '../../../components/relative_timestamp';
-import DisplayName from '../../../components/display_name';
-import Avatar from '../../../components/avatar';
-import AttachmentList from '../../../components/attachment_list';
-import { HotKeys } from 'react-hotkeys';
-import classNames from 'classnames';
+import StatusContainer from '../../../containers/status_container';
export default class Conversation extends ImmutablePureComponent {
@@ -19,7 +13,7 @@ export default class Conversation extends ImmutablePureComponent {
static propTypes = {
conversationId: PropTypes.string.isRequired,
accounts: ImmutablePropTypes.list.isRequired,
- lastStatus: ImmutablePropTypes.map.isRequired,
+ lastStatusId: PropTypes.string,
unread:PropTypes.bool.isRequired,
onMoveUp: PropTypes.func,
onMoveDown: PropTypes.func,
@@ -31,13 +25,13 @@ export default class Conversation extends ImmutablePureComponent {
return;
}
- const { lastStatus, unread, markRead } = this.props;
+ const { lastStatusId, unread, markRead } = this.props;
if (unread) {
markRead();
}
- this.context.router.history.push(`/statuses/${lastStatus.get('id')}`);
+ this.context.router.history.push(`/statuses/${lastStatusId}`);
}
handleHotkeyMoveUp = () => {
@@ -49,44 +43,20 @@ export default class Conversation extends ImmutablePureComponent {
}
render () {
- const { accounts, lastStatus, lastAccount, unread } = this.props;
+ const { accounts, lastStatusId, unread } = this.props;
- if (lastStatus === null) {
+ if (lastStatusId === null) {
return null;
}
- const handlers = {
- moveDown: this.handleHotkeyMoveDown,
- moveUp: this.handleHotkeyMoveUp,
- open: this.handleClick,
- };
-
- let media;
-
- if (lastStatus.get('media_attachments').size > 0) {
- media =
;
- }
-
return (
-
-
-
-
-
{accounts.map(account =>
)}
-
-
-
-
-
-
-
-
-
-
-
- {media}
-
-
+
);
}
diff --git a/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js b/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
index e2e2e3afb5..bd6f6bfb01 100644
--- a/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
+++ b/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
@@ -4,13 +4,11 @@ import { markConversationRead } from '../../../actions/conversations';
const mapStateToProps = (state, { conversationId }) => {
const conversation = state.getIn(['conversations', 'items']).find(x => x.get('id') === conversationId);
- const lastStatus = state.getIn(['statuses', conversation.get('last_status')], null);
return {
accounts: conversation.get('accounts').map(accountId => state.getIn(['accounts', accountId], null)),
unread: conversation.get('unread'),
- lastStatus,
- lastAccount: lastStatus === null ? null : state.getIn(['accounts', lastStatus.get('account')], null),
+ lastStatusId: conversation.get('last_status', null),
};
};
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 24b614a37f..f77dc405c5 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -801,7 +801,7 @@
padding: 8px 10px;
padding-left: 68px;
position: relative;
- min-height: 48px;
+ min-height: 54px;
border-bottom: 1px solid lighten($ui-base-color, 8%);
cursor: default;
@@ -823,7 +823,7 @@
margin-top: 8px;
}
- &.status-direct {
+ &.status-direct:not(.read) {
background: lighten($ui-base-color, 8%);
border-bottom-color: lighten($ui-base-color, 12%);
}
@@ -1133,6 +1133,18 @@
vertical-align: middle;
margin-right: 5px;
}
+
+ &-composite {
+ @include avatar-radius();
+ overflow: hidden;
+
+ & > div {
+ @include avatar-radius();
+ float: left;
+ position: relative;
+ box-sizing: border-box;
+ }
+ }
}
a .account__avatar {
@@ -5497,49 +5509,3 @@ noscript {
}
}
}
-
-.conversation {
- padding: 14px 10px;
- border-bottom: 1px solid lighten($ui-base-color, 8%);
- cursor: pointer;
-
- &--unread {
- background: lighten($ui-base-color, 8%);
- border-bottom-color: lighten($ui-base-color, 12%);
- }
-
- &__header {
- display: flex;
- margin-bottom: 15px;
- }
-
- &__avatars {
- overflow: hidden;
- flex: 1 1 auto;
-
- & > div {
- display: flex;
- flex-wrap: none;
- width: 900px;
- }
-
- .account__avatar {
- margin-right: 10px;
- }
- }
-
- &__time {
- flex: 0 0 auto;
- font-size: 14px;
- color: $darker-text-color;
- text-align: right;
-
- .display-name {
- color: $secondary-text-color;
- }
- }
-
- .attachment-list.compact {
- margin-top: 15px;
- }
-}