Redesign direct messages column (#9022)

This commit is contained in:
Eugen Rochko 2018-10-20 02:23:58 +02:00 committed by GitHub
parent 029943d59b
commit eb1b9903a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 152 additions and 108 deletions

View file

@ -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),
};
};