Этот коммит содержится в:
hmhealey
2015-11-17 16:10:16 -05:00
родитель 3d572be2f3
Коммит 70de0125ab
8 изменённых файлов: 37 добавлений и 59 удалений

Просмотреть файл

@@ -4,7 +4,7 @@
const UserStore = require('../stores/user_store.jsx');
const Client = require('../utils/client.jsx');
const AsyncClient = require('../utils/async_client.jsx');
const Modal = require('./modal.jsx');
const Modal = ReactBootstrap.Modal;
const LoadingScreen = require('./loading_screen.jsx');
const Utils = require('../utils/utils.jsx');
@@ -62,6 +62,15 @@ export default class ActivityLogModal extends React.Component {
}
componentDidMount() {
UserStore.addSessionsChangeListener(this.onListenerChange);
if (this.props.show) {
this.onShow();
}
}
componentDidUpdate(prevProps) {
if (this.props.show && !prevProps.show) {
this.onShow();
}
}
componentWillUnmount() {
UserStore.removeSessionsChangeListener(this.onListenerChange);
@@ -156,7 +165,6 @@ export default class ActivityLogModal extends React.Component {
return (
<Modal
show={this.props.show}
onShow={this.onShow}
onHide={this.onHide}
bsSize='large'
>