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