feat(App): move participant leaving logic to base/participants

This commit is contained in:
Saúl Ibarra Corretgé
2018-07-12 11:28:17 -05:00
committed by Lyubo Marinov
parent 96a837801e
commit f2f991e969
2 changed files with 24 additions and 8 deletions
+2 -7
View File
@@ -9,7 +9,6 @@ import { compose, createStore } from 'redux';
import Thunk from 'redux-thunk';
import { i18next } from '../../base/i18n';
import { localParticipantLeft } from '../../base/participants';
import {
MiddlewareRegistry,
ReducerRegistry,
@@ -118,8 +117,7 @@ export class AbstractApp extends Component {
}
/**
* Init lib-jitsi-meet and create local participant when component is going
* to be mounted.
* Initializes the app.
*
* @inheritdoc
*/
@@ -185,16 +183,13 @@ export class AbstractApp extends Component {
}
/**
* Dispose lib-jitsi-meet and remove local participant when component is
* going to be unmounted.
* De-initializes the app.
*
* @inheritdoc
*/
componentWillUnmount() {
const { dispatch } = this._getStore();
dispatch(localParticipantLeft());
dispatch(appWillUnmount(this));
}