Add .noMedia setting
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { Button, List, Snackbar } from 'react-native-paper';
|
||||
import { Button, List, Snackbar, Switch, Text } from 'react-native-paper';
|
||||
import { useRealm } from '@realm/react';
|
||||
import { openDocumentTree } from 'react-native-scoped-storage';
|
||||
import { PaddedView } from '../components';
|
||||
@@ -14,7 +14,7 @@ const SettingsScreen = () => {
|
||||
const [snackbarVisible, setSnackbarVisible] = useState(false);
|
||||
const [snackbarMessage, setSnackbarMessage] = useState('');
|
||||
|
||||
const { setSettings } = useSettings();
|
||||
const { settings, setSettings } = useSettings();
|
||||
|
||||
const realm = useRealm();
|
||||
|
||||
@@ -66,6 +66,20 @@ const SettingsScreen = () => {
|
||||
}}>
|
||||
Change External Storage Path
|
||||
</Button>
|
||||
<View
|
||||
style={[
|
||||
styles.flexRowSpaceBetween,
|
||||
styles.smallPaddingHorizontal,
|
||||
styles.marginBottom,
|
||||
]}>
|
||||
<Text>Hide media from gallery</Text>
|
||||
<Switch
|
||||
value={settings.noMedia}
|
||||
onValueChange={value => {
|
||||
setSettings({ noMedia: value });
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</List.Section>
|
||||
</View>
|
||||
</PaddedView>
|
||||
|
Reference in New Issue
Block a user