fix media auto download view layout and minor tweak wifi
This commit is contained in:
parent
e0942b24a4
commit
332e51f2db
|
@ -67,7 +67,7 @@ const DownloadIndicator = ({ handleCancelDownload }: { handleCancelDownload(): v
|
|||
<Text style={[styles.text, { color: colors.auxiliaryText }]}>{I18n.t('Cancel')}</Text>
|
||||
</Touchable>
|
||||
</View>
|
||||
<RCActivityIndicator />
|
||||
<RCActivityIndicator size={48} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -905,6 +905,6 @@
|
|||
"Images": "Images",
|
||||
"Video": "Video",
|
||||
"Wi_Fi_and_mobile_data":"Wi-Fi and mobile data",
|
||||
"Wi_Fi": "Wi-fi",
|
||||
"Wi_Fi": "Wi-Fi",
|
||||
"Off": "Off"
|
||||
}
|
|
@ -891,6 +891,6 @@
|
|||
"Images": "Imagens",
|
||||
"Video": "Vídeo",
|
||||
"Wi_Fi_and_mobile_data":"Wi-Fi e dados móveis",
|
||||
"Wi_Fi": "Wi-fi",
|
||||
"Wi_Fi": "Wi-Fi",
|
||||
"Off": "Desativado"
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
import React from 'react';
|
||||
import React, { useLayoutEffect } from 'react';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
|
||||
import * as List from '../../containers/List';
|
||||
import SafeAreaView from '../../containers/SafeAreaView';
|
||||
|
@ -11,6 +13,8 @@ import {
|
|||
MediaDownloadOption,
|
||||
VIDEO_PREFERENCE_DOWNLOAD
|
||||
} from '../../lib/constants';
|
||||
import i18n from '../../i18n';
|
||||
import { SettingsStackParamList } from '../../stacks/types';
|
||||
|
||||
const MediaAutoDownload = () => {
|
||||
const [imagesPreference, setImagesPreference] = useUserPreferences<MediaDownloadOption>(
|
||||
|
@ -19,32 +23,40 @@ const MediaAutoDownload = () => {
|
|||
);
|
||||
const [videoPreference, setVideoPreference] = useUserPreferences<MediaDownloadOption>(VIDEO_PREFERENCE_DOWNLOAD, 'wifi');
|
||||
const [audioPreference, setAudioPreference] = useUserPreferences<MediaDownloadOption>(AUDIO_PREFERENCE_DOWNLOAD, 'wifi');
|
||||
const navigation = useNavigation<StackNavigationProp<SettingsStackParamList, 'MediaAutoDownloadView'>>();
|
||||
|
||||
useLayoutEffect(() => {
|
||||
navigation.setOptions({
|
||||
title: i18n.t('Media_auto_download')
|
||||
});
|
||||
}, [navigation]);
|
||||
|
||||
return (
|
||||
<SafeAreaView testID='security-privacy-view'>
|
||||
<SafeAreaView testID='media-auto-download-view'>
|
||||
<StatusBar />
|
||||
<List.Container testID='security-privacy-view-list'>
|
||||
<List.Section>
|
||||
<List.Separator />
|
||||
<ListPicker
|
||||
onChangeValue={setImagesPreference}
|
||||
value={imagesPreference}
|
||||
title='Images'
|
||||
testID='media-auto-download-view-images'
|
||||
/>
|
||||
<ListPicker
|
||||
onChangeValue={setVideoPreference}
|
||||
value={videoPreference}
|
||||
title='Video'
|
||||
testID='media-auto-download-view-video'
|
||||
/>
|
||||
<ListPicker
|
||||
onChangeValue={setAudioPreference}
|
||||
value={audioPreference}
|
||||
title='Audio'
|
||||
testID='media-auto-download-view-audio'
|
||||
/>
|
||||
</List.Section>
|
||||
<List.Container testID='media-auto-download-view-list'>
|
||||
<List.Separator />
|
||||
<ListPicker
|
||||
onChangeValue={setImagesPreference}
|
||||
value={imagesPreference}
|
||||
title='Images'
|
||||
testID='media-auto-download-view-images'
|
||||
/>
|
||||
<List.Separator />
|
||||
<ListPicker
|
||||
onChangeValue={setVideoPreference}
|
||||
value={videoPreference}
|
||||
title='Video'
|
||||
testID='media-auto-download-view-video'
|
||||
/>
|
||||
<List.Separator />
|
||||
<ListPicker
|
||||
onChangeValue={setAudioPreference}
|
||||
value={audioPreference}
|
||||
title='Audio'
|
||||
testID='media-auto-download-view-audio'
|
||||
/>
|
||||
<List.Separator />
|
||||
</List.Container>
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue