|
|
@@ -4,13 +4,11 @@ import React, { PureComponent } from 'react';
|
|
4
|
4
|
import { Text, TouchableOpacity, View } from 'react-native';
|
|
5
|
5
|
|
|
6
|
6
|
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
|
7
|
|
-import { getFeatureFlag, INVITE_ENABLED } from '../../../base/flags';
|
|
8
|
7
|
import { connect } from '../../../base/redux';
|
|
9
|
8
|
import { StyleType } from '../../../base/styles';
|
|
10
|
9
|
import { translate } from '../../../base/i18n';
|
|
11
|
10
|
import { getParticipantCount } from '../../../base/participants';
|
|
12
|
|
-import { isAddPeopleEnabled, isDialOutEnabled, setAddPeopleDialogVisible } from '../../../invite';
|
|
13
|
|
-import { beginShareRoom } from '../../../share-room';
|
|
|
11
|
+import { doInvitePeople } from '../../../invite/actions.native';
|
|
14
|
12
|
|
|
15
|
13
|
import styles from './styles';
|
|
16
|
14
|
import { Icon, IconAddPeople } from '../../../base/icons';
|
|
|
@@ -20,11 +18,6 @@ import { Icon, IconAddPeople } from '../../../base/icons';
|
|
20
|
18
|
*/
|
|
21
|
19
|
type Props = {
|
|
22
|
20
|
|
|
23
|
|
- /**
|
|
24
|
|
- * True if any of the invite functions are enabled.
|
|
25
|
|
- */
|
|
26
|
|
- _inviteEnabled: boolean,
|
|
27
|
|
-
|
|
28
|
21
|
/**
|
|
29
|
22
|
* True if it's a lonely meeting (participant count excluding fakes is 1).
|
|
30
|
23
|
*/
|
|
|
@@ -112,13 +105,7 @@ class LonelyMeetingExperience extends PureComponent<Props> {
|
|
112
|
105
|
* @returns {void}
|
|
113
|
106
|
*/
|
|
114
|
107
|
_onPress() {
|
|
115
|
|
- const { _inviteEnabled, dispatch } = this.props;
|
|
116
|
|
-
|
|
117
|
|
- if (_inviteEnabled) {
|
|
118
|
|
- dispatch(setAddPeopleDialogVisible(true));
|
|
119
|
|
- } else {
|
|
120
|
|
- dispatch(beginShareRoom());
|
|
121
|
|
- }
|
|
|
108
|
+ this.props.dispatch(doInvitePeople());
|
|
122
|
109
|
}
|
|
123
|
110
|
}
|
|
124
|
111
|
|
|
|
@@ -130,11 +117,7 @@ class LonelyMeetingExperience extends PureComponent<Props> {
|
|
130
|
117
|
* @returns {Props}
|
|
131
|
118
|
*/
|
|
132
|
119
|
function _mapStateToProps(state): $Shape<Props> {
|
|
133
|
|
- const _inviteEnabled = getFeatureFlag(state, INVITE_ENABLED, true)
|
|
134
|
|
- && (isAddPeopleEnabled(state) || isDialOutEnabled(state));
|
|
135
|
|
-
|
|
136
|
120
|
return {
|
|
137
|
|
- _inviteEnabled,
|
|
138
|
121
|
_isLonelyMeeting: getParticipantCount(state) === 1,
|
|
139
|
122
|
_styles: ColorSchemeRegistry.get(state, 'Conference')
|
|
140
|
123
|
};
|