diff --git a/app/soapbox/features/chats/components/chat_panes.js b/app/soapbox/features/chats/components/chat_panes.js index a6b8bd36b..d99a6b371 100644 --- a/app/soapbox/features/chats/components/chat_panes.js +++ b/app/soapbox/features/chats/components/chat_panes.js @@ -4,11 +4,13 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { getSettings } from 'soapbox/actions/settings'; +// import { getSettings } from 'soapbox/actions/settings'; import ChatList from './chat_list'; import { FormattedMessage } from 'react-intl'; import { makeGetChat } from 'soapbox/selectors'; -// import { fromJS } from 'immutable'; +import { fromJS } from 'immutable'; +import Avatar from 'soapbox/components/avatar'; +import { acctFull } from 'soapbox/utils/accounts'; const addChatsToPanes = (state, panesData) => { const getChat = makeGetChat(); @@ -22,13 +24,15 @@ const addChatsToPanes = (state, panesData) => { }; const mapStateToProps = state => { - const panesData = getSettings(state).get('chats'); + // const panesData = getSettings(state).get('chats'); - // const panesData = fromJS({ - // panes: [ - // { chat_id: '9ySohyWw0Gecd3WHKK', state: 'open' }, - // ], - // }); + const panesData = fromJS({ + panes: [ + { chat_id: '9ySoi8J7eTY0x78OBc', state: 'open' }, + { chat_id: '9ySoi8J7eTY0x78OBc', state: 'open' }, + { chat_id: '9ySoi8J7eTY0x78OBc', state: 'open' }, + ], + }); return { panesData: addChatsToPanes(state, panesData), @@ -47,17 +51,21 @@ class ChatPanes extends ImmutablePureComponent { renderChatPane = (pane, i) => { const chat = pane.get('chat'); - if (!chat) return null; + const account = pane.getIn(['chat', 'account']); + if (!chat || !account) return null; + + const right = (285 * (i + 1)) + 20; return ( -