Add server message parser validation
This commit is contained in:
parent
81c0d322c3
commit
73f4e815c0
|
@ -202,5 +202,8 @@ export default {
|
||||||
},
|
},
|
||||||
Jitsi_Enable_Channels: {
|
Jitsi_Enable_Channels: {
|
||||||
type: 'valuesAsBoolean'
|
type: 'valuesAsBoolean'
|
||||||
|
},
|
||||||
|
Accounts_Default_User_Preferences_enableMessageParserEarlyAdoption: {
|
||||||
|
type: 'valueAsBoolean'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,6 +17,7 @@ import RocketChat from '../../lib/rocketchat';
|
||||||
|
|
||||||
const UserPreferencesView = ({ navigation }) => {
|
const UserPreferencesView = ({ navigation }) => {
|
||||||
const user = useSelector(state => getUserSelector(state));
|
const user = useSelector(state => getUserSelector(state));
|
||||||
|
const isMessageParserServerEnabled = useSelector(state => state.settings.Accounts_Default_User_Preferences_enableMessageParserEarlyAdoption);
|
||||||
const [enableParser, setEnableParser] = useState(user.enableMessageParserEarlyAdoption);
|
const [enableParser, setEnableParser] = useState(user.enableMessageParserEarlyAdoption);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -61,6 +62,7 @@ const UserPreferencesView = ({ navigation }) => {
|
||||||
/>
|
/>
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
</List.Section>
|
</List.Section>
|
||||||
|
{isMessageParserServerEnabled && (
|
||||||
<List.Section>
|
<List.Section>
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
<List.Item
|
<List.Item
|
||||||
|
@ -70,6 +72,7 @@ const UserPreferencesView = ({ navigation }) => {
|
||||||
/>
|
/>
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
</List.Section>
|
</List.Section>
|
||||||
|
)}
|
||||||
</List.Container>
|
</List.Container>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue