rn: drop {AddPeople,Invite}Controller

We are going to implement the invite dialog *inside* the SDK, so there is no
need to have all this machinery anymore.
This commit is contained in:
Saúl Ibarra Corretgé
2019-01-18 11:56:18 +01:00
committed by Saúl Ibarra Corretgé
parent b7133f5717
commit 5f7a515610
30 changed files with 9 additions and 1996 deletions

View File

@@ -38,16 +38,6 @@ type Props = AbstractButtonProps & {
_onShareRoom: Function
};
/**
* The indicator which determines (at bundle time) whether there should be a
* button in {@code Toolbox} to expose the functionality of the feature
* share-room in the user interface of the app.
*
* @private
* @type {boolean}
*/
const _SHARE_ROOM_TOOLBAR_BUTTON = true;
/**
* Implements an {@link AbstractButton} to enter add/invite people to the
* current call/conference/meeting.
@@ -64,35 +54,12 @@ class InviteButton extends AbstractButton<Props, *> {
* @returns {void}
*/
_handleClick() {
// FIXME: dispatch _onAddPeople here, when we have a dialog for it.
const {
_addPeopleEnabled,
_dialOutEnabled,
_onAddPeople,
_onShareRoom
} = this.props;
if (_addPeopleEnabled || _dialOutEnabled) {
_onAddPeople();
} else if (_SHARE_ROOM_TOOLBAR_BUTTON) {
_onShareRoom();
}
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {React$Node}
*/
render() {
const { _addPeopleEnabled, _dialOutEnabled } = this.props;
return (
_SHARE_ROOM_TOOLBAR_BUTTON
|| _addPeopleEnabled
|| _dialOutEnabled
? super.render()
: null);
_onShareRoom();
}
}
@@ -110,7 +77,7 @@ class InviteButton extends AbstractButton<Props, *> {
function _mapDispatchToProps(dispatch: Dispatch<*>) {
return {
/**
* Launches native invite dialog.
* Launches the add people dialog.
*
* @private
* @returns {void}