|
|
@@ -8,7 +8,7 @@ import { translate } from '../../base/i18n';
|
|
8
|
8
|
import { Switch } from '../../base/react';
|
|
9
|
9
|
import { connect } from '../../base/redux';
|
|
10
|
10
|
import { toggleE2EE } from '../actions';
|
|
11
|
|
-
|
|
|
11
|
+import { doesEveryoneSupportE2EE } from '../functions';
|
|
12
|
12
|
|
|
13
|
13
|
type Props = {
|
|
14
|
14
|
|
|
|
@@ -38,12 +38,7 @@ type State = {
|
|
38
|
38
|
/**
|
|
39
|
39
|
* True if the switch is toggled on.
|
|
40
|
40
|
*/
|
|
41
|
|
- enabled: boolean,
|
|
42
|
|
-
|
|
43
|
|
- /**
|
|
44
|
|
- * True if the section description should be expanded, false otherwise.
|
|
45
|
|
- */
|
|
46
|
|
- expand: boolean
|
|
|
41
|
+ enabled: boolean
|
|
47
|
42
|
};
|
|
48
|
43
|
|
|
49
|
44
|
/**
|
|
|
@@ -147,11 +142,11 @@ class E2EESection extends Component<Props, State> {
|
|
147
|
142
|
* @returns {Props}
|
|
148
|
143
|
*/
|
|
149
|
144
|
function mapStateToProps(state) {
|
|
150
|
|
- const { enabled, everyoneSupportE2EE } = state['features/e2ee'];
|
|
|
145
|
+ const { enabled } = state['features/e2ee'];
|
|
151
|
146
|
|
|
152
|
147
|
return {
|
|
153
|
148
|
_enabled: enabled,
|
|
154
|
|
- _everyoneSupportE2EE: everyoneSupportE2EE
|
|
|
149
|
+ _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
|
|
155
|
150
|
};
|
|
156
|
151
|
}
|
|
157
|
152
|
|