kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Chats: fetch chats in UI instead of chat list, fixes #384
rodzic
57fc08771c
commit
9d7b86935f
|
@ -3,7 +3,6 @@ import { connect } from 'react-redux';
|
|||
import PropTypes from 'prop-types';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { fetchChats } from 'soapbox/actions/chats';
|
||||
import Chat from './chat';
|
||||
import { makeGetChat } from 'soapbox/selectors';
|
||||
|
||||
|
@ -42,10 +41,6 @@ class ChatList extends ImmutablePureComponent {
|
|||
emptyMessage: PropTypes.node,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.dispatch(fetchChats());
|
||||
}
|
||||
|
||||
render() {
|
||||
const { chats, emptyMessage } = this.props;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import { expandHomeTimeline } from '../../actions/timelines';
|
|||
import { expandNotifications } from '../../actions/notifications';
|
||||
import { fetchReports } from '../../actions/admin';
|
||||
import { fetchFilters } from '../../actions/filters';
|
||||
import { fetchChats } from 'soapbox/actions/chats';
|
||||
import { clearHeight } from '../../actions/height_cache';
|
||||
import { openModal } from '../../actions/modal';
|
||||
import { WrappedRoute } from './util/react_router_helpers';
|
||||
|
@ -433,6 +434,7 @@ class UI extends React.PureComponent {
|
|||
if (account) {
|
||||
this.props.dispatch(expandHomeTimeline());
|
||||
this.props.dispatch(expandNotifications());
|
||||
this.props.dispatch(fetchChats());
|
||||
// this.props.dispatch(fetchGroups('member'));
|
||||
if (isStaff(account))
|
||||
this.props.dispatch(fetchReports({ state: 'open' }));
|
||||
|
|
Ładowanie…
Reference in New Issue